OSDN Git Service
Craig Topper [Wed, 5 Nov 2014 06:43:02 +0000 (06:43 +0000)]
Improve logic that decides if its profitable to commute when some of the virtual registers involved have uses/defs chains connecting them to physical register. Fix up the tests that this change improves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221336
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 5 Nov 2014 06:29:05 +0000 (06:29 +0000)]
llvm/test/Transforms/GCOVProfiling: Avoid to parse backslashes in MDString. Use %/T instead of %T.
LLVM Parser decodes "\bb" as hex in "C:\bb-win7\buildername\build...", with MDString.
See also, http://llvm.org/docs/LangRef.html#metadata-nodes-and-metadata-strings
This reverts r221270, "Disable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating."
FIXME: Please check EC in GCOVProfiler::emitProfileNotes().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221334
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 5 Nov 2014 06:24:35 +0000 (06:24 +0000)]
llvm-readobj: Add support for dumping the DOS header in PE files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221333
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Wed, 5 Nov 2014 04:44:31 +0000 (04:44 +0000)]
Revert 220932.
Commit 220932 caused crash when building clang-tblgen on aarch64 debian target,
so it's blocking all daily tests.
The std::call_once implementation in pthread has bug for aarch64 debian.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221331
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 01:55:06 +0000 (01:55 +0000)]
IR: Metadata: Remove unnecessary dyn_cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221328
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 5 Nov 2014 01:36:22 +0000 (01:36 +0000)]
Fix broken C++ mode comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221327
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 5 Nov 2014 00:59:59 +0000 (00:59 +0000)]
InstSimplify: Exact shifts of X by Y are X if X has the lsb set
Exact shifts may not shift out any non-zero bits. Use computeKnownBits
to determine when this occurs and just return the left hand side.
This fixes PR21477.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221325
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 5 Nov 2014 00:35:15 +0000 (00:35 +0000)]
Add a check for misbehaving -Wcomment from gcc-4.7 and add
-Wno-comment to the compilation flags if so.
Patch by Filipe Cabecinhas, configure regenerated by me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221323
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 5 Nov 2014 00:27:20 +0000 (00:27 +0000)]
ARM: try to add extra CS-register whenever stack alignment >= 8.
We currently try to push an even number of registers to preserve 8-byte
alignment during a function's prologue, but only when the stack alignment is
prcisely 8. Many of the reasons for doing it apply also when that alignment > 8
(the extra store is often free, and can save another stack adjustment, though
less frequently for 16-byte stack alignment).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221321
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 5 Nov 2014 00:27:13 +0000 (00:27 +0000)]
ARM/Dwarf: correctly align stack before callee-saved VPRs
We were making an attempt to do this by adding an extra callee-saved GPR (so
that there was an even number in the list), but when that failed we went ahead
and pushed anyway.
This had a couple of potential issues:
+ The .cfi directives we emit misplaced dN because they were based on
PrologEpilogInserter's calculation.
+ Unaligned stores can be less efficient.
+ Unaligned stores can actually fault (likely only an issue in niche cases,
but possible).
This adds a final explicit stack adjustment if all other options fail, so that
the actual locations of the registers match up with where they should be.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221320
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 23:49:08 +0000 (23:49 +0000)]
Analysis: Make isSafeToSpeculativelyExecute fire less for divides
Divides and remainder operations do not behave like other operations
when they are given poison: they turn into undefined behavior.
It's really hard to know if the operands going into a div are or are not
poison. Because of this, we should only choose to speculate if there
are constant operands which we can easily reason about.
This fixes PR21412.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221318
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 4 Nov 2014 23:42:45 +0000 (23:42 +0000)]
Revert "[Reassociate] Canonicalize negative constants out of expressions."
This reverts commit r221171.
It performs this invalid transformation:
- %div.i = urem i64 -1, %add
- %sub.i = sub i64 -2, %div.i
+ %div.i = urem i64 1, %add
+ %sub.i1 = add i64 %div.i, -2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221317
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 4 Nov 2014 23:25:08 +0000 (23:25 +0000)]
[X86][SSE] Enable commutation for SSE immediate blend instructions
Patch to allow (v)blendps, (v)blendpd, (v)pblendw and vpblendd instructions to be commuted - swaps the src registers and inverts the blend mask.
This is primarily to improve memory folding (see new tests), but it also improves the quality of shuffles (see modified tests).
Differential Revision: http://reviews.llvm.org/D6015
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221313
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Heffernan [Tue, 4 Nov 2014 23:02:09 +0000 (23:02 +0000)]
Revert earlier change removing setPreservesCFG from instcombine (r221223) and
change LoopSimplifyPass to be !isCFGOnly. The motivation for the earlier patch
(r221223) was that LoopSimplify is not preserved by instcombine though
setPreservesCFG indicates that it is. This change fixes the issue
by making setPreservesCFG no longer imply LoopSimplifyPass, and is therefore less
invasive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221311
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Tue, 4 Nov 2014 22:20:07 +0000 (22:20 +0000)]
[AArch64] Use the correct register class for ORR.
While fixing up the register classes in the machine combiner in a previous
commit I missed one.
This fixes the last one and adds a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221308
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 4 Nov 2014 22:15:05 +0000 (22:15 +0000)]
Revert "[mips] Add names and tests for the hardware registers"
This reverts commit r221299.
The tests
LLVM :: MC/Disassembler/Mips/mips32.txt
LLVM :: MC/Disassembler/Mips/mips32_le.txt
were failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221307
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 4 Nov 2014 22:12:25 +0000 (22:12 +0000)]
Provide gmlt-like inline scope information in the skeleton CU to facilitate symbolication without needing the .dwo files
Clang -gsplit-dwarf self-host -O0, binary increases by 0.0005%, -O2,
binary increases by 25%.
A large binary inside Google, split-dwarf, -O0, and other internal flags
(GDB index, etc) increases by 1.8%, optimized build is 35%.
The size impact may be somewhat greater in .o files (I haven't measured
that much - since the linked executable -O0 numbers seemed low enough)
due to relocations. These relocations could be removed if we taught the
llvm-symbolizer to handle indexed addressing in the .o file (GDB can't
cope with this just yet, but GDB won't be reading this info anyway).
Also debug_ranges could be shared between .o and .dwo, though ideally
debug_ranges would get a schema that could used index(+offset)
addressing, and move to the .dwo file, then we'd be back to sharing
addresses in the address pool again.
But for now, these sizes seem small enough to go ahead with this.
Verified that no other DW_TAGs are produced into the .o file other than
subprograms and inlined_subroutines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221306
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 4 Nov 2014 22:12:18 +0000 (22:12 +0000)]
Move cross-unit DIE caching to the DwarfFile level, so it doesn't interfere with fission-gmlt data and produce skeleton<>full unit cross referencing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221305
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 4 Nov 2014 22:10:33 +0000 (22:10 +0000)]
Don't produce relocations for a difference in a section with no symbols.
We were producing a relocation for
----------------
.section foo,bar
La:
Lb:
.long La-Lb
--------------
but not for
---------------------
.section foo,bar
zed:
La:
Lb:
.long La-Lb
----------------
This patch handles the case where both fragments are part of the first atom
in a section and there is no corresponding symbol to that atom.
This fixes pr21328.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221304
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Tue, 4 Nov 2014 21:45:16 +0000 (21:45 +0000)]
[mips] Move COP2 & COP3 load/store instructions from MipsInstrFPU.td to MipsInstrInfo.td. NFC.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5843
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221300
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Tue, 4 Nov 2014 21:30:44 +0000 (21:30 +0000)]
[mips] Add names and tests for the hardware registers
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5763
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221299
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 4 Nov 2014 21:18:09 +0000 (21:18 +0000)]
[X86] Add 'FeatureSlowSHLD' to cpu 'bdver3'. Also explicit set FeatureAVX and FeatureSSE4A for all the bdver* cpus.
This patch adds 'FeatureSlowSHLD' to 'bdver3'.
According to the official AMD optimization guide for amdfam15: "Using
alternative code in place of SHLD achieves lower overall latency and
requires fewer execution resources. The 32-bit and 64-bit forms of
ADD, ADC, SHR, and LEA (except 16-bit form) are DirectPath
instructions, while SHLD is a VectorPath instruction."
This patch also explicitly sets feature AVX and SSE4A for all the bdver*
cpus. This part of the patch is a non-functional change and it is mainly
done for clarity reasons (Both XOP and FMA4 already imply AVX and SSE4A).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221296
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 4 Nov 2014 21:01:48 +0000 (21:01 +0000)]
ErrorOr: Be more explicit in the implicit conversion to bool docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221295
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Tue, 4 Nov 2014 20:51:29 +0000 (20:51 +0000)]
[PBQP] Callee saved regs should have a higher cost than scratch regs
Registers are not all equal. Some are not allocatable (infinite cost),
some have to be preserved but can be used, and some others are just free
to use.
Ensure there is a cost hierarchy reflecting this fact, so that the
allocator will favor scratch registers over callee-saved registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221293
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Tue, 4 Nov 2014 20:51:24 +0000 (20:51 +0000)]
[PBQP] Tweak spill costs and coalescing benefits
This patch improves how the different costs (register, interference, spill
and coalescing) relates together. The assumption is now that:
- coalescing (or any other "side effect" of reg alloc) is negative, and
instead of being derived from a spill cost, they use the block
frequency info.
- spill costs are in the [MinSpillCost:+inf( range
- register or interference costs are in [0.0:MinSpillCost( or +inf
The current MinSpillCost is set to 10.0, which is a random value high
enough that the current constraint builders do not need to worry about
when settings costs. It would however be worth adding a normalization
step for register and interference costs as the last step in the
constraint builder chain to ensure they are not greater than SpillMinCost
(unless this has some sense for some architectures). This would work well
with the current builder pipeline, where all costs are tweaked relatively
to each others, but could grow above MinSpillCost if the pipeline is
deep enough.
The current heuristic is tuned to depend rather on the number of uses of
a live interval rather than a density of uses, as used by the greedy
allocator. This heuristic provides a few percent improvement on a number
of benchmarks (eembc, spec, ...) and will definitely need to change once
spill placement is implemented: the current spill placement is really
ineficient, so making the cost proportionnal to the number of use is a
clear win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221292
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 4 Nov 2014 20:29:20 +0000 (20:29 +0000)]
R600/SI: Rename div_scale dest operands to match documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221291
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 4 Nov 2014 20:10:06 +0000 (20:10 +0000)]
AArch64: Pattern match integer vector abs like we do on ARM.
This kind of pattern is emitted by the loop vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221289
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 4 Nov 2014 19:46:15 +0000 (19:46 +0000)]
[asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar Sukhani
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221288
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 4 Nov 2014 18:18:52 +0000 (18:18 +0000)]
Remove unused DisableRedZone option.
Patch by Steve King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221282
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 17:47:13 +0000 (17:47 +0000)]
InstSimplify: Fold a hasNoSignedWrap() call into a match() expression
No functionality change intended, it's just a little more concise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221281
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 17:38:50 +0000 (17:38 +0000)]
InstSimplify: Fold a hasNoUnsignedWrap() call into a match() expression
No functionality change intended, it's just a little more concise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221280
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Tue, 4 Nov 2014 17:18:07 +0000 (17:18 +0000)]
[mips] Improve support for the .set mips16/nomips16 assembler directives.
Summary:
Appropriately set/clear the FeatureBit for Mips16 when these assembler directives are used and also emit ".set nomips16" (previously, only ".set mips16" was being emitted).
These improvements allow for better testing of the .cpload/.cprestore assembler directives (which are not supposed to work when Mips16 is enabled).
Test Plan: The test is bare-bones because there are no MC tests for Mips16 instructions (there's only one, which checks that the Mips16 ELF header flag gets set), and that suggests to me that it has not been implemented yet in the IAS.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5462
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221277
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Tue, 4 Nov 2014 17:11:00 +0000 (17:11 +0000)]
[Stackmaps] Make test less fragile. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221276
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 4 Nov 2014 16:27:42 +0000 (16:27 +0000)]
remove function names from comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221274
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 4 Nov 2014 16:09:50 +0000 (16:09 +0000)]
fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221273
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 14:41:53 +0000 (14:41 +0000)]
Disable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221270
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:41:33 +0000 (13:41 +0000)]
Remove "REQUIRES:shell" from tests. They work for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221269
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Tue, 4 Nov 2014 13:33:36 +0000 (13:33 +0000)]
[yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221268
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:19:29 +0000 (13:19 +0000)]
Re-enable tests in llvm/test/Object, corresponding to line_iterator's
change in r221153.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221265
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 13:00:48 +0000 (13:00 +0000)]
llvm/test/Transforms/GCOVProfiling/linezero.ll: Use %/T instead of %T in regex. This works on win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221262
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 4 Nov 2014 12:35:47 +0000 (12:35 +0000)]
Remove FindProgramByName. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221258
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 4 Nov 2014 09:22:41 +0000 (09:22 +0000)]
Fix Visual C++ warning, Program.inc(85): warning C4018: '<' : signed/unsigned mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221252
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Tue, 4 Nov 2014 09:07:40 +0000 (09:07 +0000)]
Add missing tests for build attribute encodings in object files.
test/MC/ARM/directive-eabi_attribute.s was missing several tests of object file
encodings relative to the existing tests for assembly file encodings. This
commit adds the missing tests.
Change-Id: Ie110ca02b65e8f4d4c77f437bd09d03607fa5c0d
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221250
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 08:41:48 +0000 (08:41 +0000)]
llvm-objdump: Pass DiceTableEntry by reference
DiceTableEntry is 24 bytes on my machine, it's probably better to pass
them by reference.
This fixes PR21464.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221247
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 08:17:15 +0000 (08:17 +0000)]
sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to appease clang Driver's tests.
It seems SearchPath() doesn't show actual extension on the filesystem.
FIXME: Shall we use FindFirstFile() here?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221246
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 08:03:31 +0000 (08:03 +0000)]
CodeGen: Enable DWARF emission for MS ABI targets
This is experimental, just barely enough to get things to not
immediately combust.
A note for those who are curious:
Only lld can successfully link the object files, other linkers truncate
the section names making the debug sections illegible to debuggers.
Even with this in mind, we believe we are having trouble with SECREL
relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221245
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 4 Nov 2014 07:53:30 +0000 (07:53 +0000)]
#include <winbase.h> is not enough for Visual C++ 2013, it errors:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C2146: syntax error : missing ';' before identifier 'nLength'
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
including <windows.h> is actually required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221244
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 05:54:50 +0000 (05:54 +0000)]
test: Restore llvm-lit (at least for my machine)
r221137 feeds None into os.path.join which is not valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221242
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 4 Nov 2014 05:17:58 +0000 (05:17 +0000)]
Minimize test case further
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221237
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Nov 2014 02:16:53 +0000 (02:16 +0000)]
R600/LLVMBuild.txt: Add TransformUtils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221228
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 4 Nov 2014 02:16:03 +0000 (02:16 +0000)]
Docs: give binutils/gold instructions for CMake too.
Patch by Steve King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221227
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 4 Nov 2014 02:02:14 +0000 (02:02 +0000)]
Revert "Transforms: reapply SVN r219899"
This reverts commit r220811 and r220839. It made an incorrect change to
musttail handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221226
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Heffernan [Tue, 4 Nov 2014 01:51:01 +0000 (01:51 +0000)]
Remove setPreservesCFG from instcombine. The pass, in particular, does not
preserve LoopSimplify because instcombine may replace branch predicates
with undef which loop simplify then replaces with always exit. Replace
setPreservesCFG with the more constrained preservation of DomTree and
LoopInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221223
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 4 Nov 2014 01:29:59 +0000 (01:29 +0000)]
Use findProgramByName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221221
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 4 Nov 2014 01:29:29 +0000 (01:29 +0000)]
[Support][Program] Add findProgramByName(Name, OptionalPaths)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221220
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 4 Nov 2014 01:28:33 +0000 (01:28 +0000)]
Use the LLVM_GNUC_PREREQ macro instead of the longhand version check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221219
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 4 Nov 2014 01:15:53 +0000 (01:15 +0000)]
Remove the END_WITH_NULL macro now that Clang doesn't use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221218
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 4 Nov 2014 01:12:39 +0000 (01:12 +0000)]
Remove the static version of getScatteredRelocationType() now that r221211 added
a public version MachOObjectFile::getScatteredRelocationType().
This should fix the build bot for the unused function error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221216
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 4 Nov 2014 01:12:21 +0000 (01:12 +0000)]
Rename END_WITH_NULL to LLVM_END_WITH_NULL and move to Compiler.h
We shouldn't put this kind of attribute stuff in DataTypes.h.
Leave the END_WITH_NULL name for now so I can update clang without
making build spam.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221215
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 4 Nov 2014 00:59:21 +0000 (00:59 +0000)]
The patchpoint lowering logic would crash with live constants equal to
the tombstone or empty keys of a DenseMap<int64_t, T>. This patch
fixes the issue (and adds a tests case).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221214
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 4 Nov 2014 00:43:16 +0000 (00:43 +0000)]
Add the code and test cases for 32-bit Intel to llvm-objdump’s Mach-O symbolizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221211
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 4 Nov 2014 00:14:36 +0000 (00:14 +0000)]
[Hexagon] Reverting 220584 to address ASAN errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221210
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 4 Nov 2014 00:06:57 +0000 (00:06 +0000)]
Change logic in StackMaps::recordStackMapOpers to use the isInt<32>
predicate instead of bitwise operations.
This is not a functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221209
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 3 Nov 2014 23:24:10 +0000 (23:24 +0000)]
Rename variables to conform to llvm coding standards.
Differential Revision: http://reviews.llvm.org/D6062
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221204
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 3 Nov 2014 23:19:16 +0000 (23:19 +0000)]
Use AA in LoadCombine
LoadCombine can be smarter about aborting when a writing instruction is
encountered, instead of aborting upon encountering any writing instruction, use
an AliasSetTracker, and only abort when encountering some write that might
alias with the loads that could potentially be combined.
This was originally motivated by comments made (and a test case provided) by
David Majnemer in response to PR21448. It turned out that LoadCombine was not
responsible for that PR, but LoadCombine should also be improved so that
unrelated stores (and @llvm.assume) don't interrupt load combining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221203
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Nov 2014 23:10:59 +0000 (23:10 +0000)]
Use common range handling for the CU's ranges
This generalizes the range handling for ranges in both the skeleton and
full unit, laying the foundation for the addition of more ranges (rather
than just the CU's special case) in the skeleton CU with fission+gmlt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221202
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 3 Nov 2014 23:06:31 +0000 (23:06 +0000)]
[AArch64] Make function processLogicalImmediate more efficient. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221199
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 3 Nov 2014 23:04:56 +0000 (23:04 +0000)]
Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.py
Currently they are passed to tests of llvm itself, but not, for example, lld.
With this patch the options are visible in every test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221198
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 3 Nov 2014 22:17:49 +0000 (22:17 +0000)]
refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221191
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 3 Nov 2014 21:55:12 +0000 (21:55 +0000)]
InstCombine: Remove infinite loop caused by FoldOpIntoPhi
FoldOpIntoPhi could create an infinite loop if the PHI could potentially
reach a BB it was considering inserting instructions into. The
instructions it would insert would eventually lead to other combines
firing which would, again, lead to FoldOpIntoPhi firing.
The solution is to handicap FoldOpIntoPhi so that it doesn't attempt to
insert instructions that the PHI might reach.
This fixes PR21377.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221187
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Nov 2014 21:52:56 +0000 (21:52 +0000)]
Push the CURangeList down into the skeleton CU (where available) rather than the full CU
So that it may be shared between skeleton/full compile unit, for CU
ranges and other ranges to be added for fission+gmlt.
(at some point we might want some kind of object shared between the
skeleton and full compile units for all those things we only want one of
in that scope, rather than having the full unit always look through to
the skeleton... - alternatively, we might be able to have the skeleton
pointer (or another, separate pointer) point to the skeleton or to the
unit itself in non-fission, so we don't have to special case its
absence)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221186
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 3 Nov 2014 21:25:18 +0000 (21:25 +0000)]
[X86] Add debug print name for X86ISD::[US]MUL8. NFC-ish.
The opcodes were added in r220516, but I forgot to add the print names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221185
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 3 Nov 2014 21:24:43 +0000 (21:24 +0000)]
[lit] Forward LD_PRELOAD to tests.
With this patch I can use asan to test the gold plugin without having
to build gold itself with asan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221183
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Nov 2014 21:15:30 +0000 (21:15 +0000)]
Add DwarfCompileUnit::BaseAddress to track the base address used by relative addressing in debug_ranges and debug_loc
This is one of a few steps to generalize range handling to include the
CU range (thus the CU's range list will be moved into the range list
list, losing track of the base address in the process), which means
generalizing ranges from both the skeleton and full unit under fission.
And... then I can used that generalized support for ranges in
fission+gmlt where there'll be a bunch more ranges in the skeleton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221182
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 3 Nov 2014 20:37:04 +0000 (20:37 +0000)]
[ARM, inline-asm] Fix ARMTargetLowering::getRegForInlineAsmConstraint to return
register class tGPRRegClass if the target is thumb1.
This commit fixes a crash that occurs during register allocation which was
triggered when a virtual register defined by an inline-asm instruction had to
be spilled.
rdar://problem/
18740489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221178
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 3 Nov 2014 20:35:30 +0000 (20:35 +0000)]
MSVC requires redeclarations to repeat noexcept
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221177
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 3 Nov 2014 20:26:35 +0000 (20:26 +0000)]
[X86] 8bit divrem: Improve codegen for AH register extraction.
For 8-bit divrems where the remainder is used, we used to generate:
divb %sil
shrw $8, %ax
movzbl %al, %eax
That was to avoid an H-reg access, which is problematic mainly because
it isn't possible in REX-prefixed instructions.
This patch optimizes that to:
divb %sil
movzbl %ah, %eax
To do that, we explicitly extend AH, and extract the L-subreg in the
resulting register. The extension is done using the NOREX variants of
MOVZX. To support signed operations, MOVSX_NOREX is also added.
Further, this introduces a new SDNode type, [us]divrem_ext_hreg, which is
then lowered to a sequence containing a single zext (rather than 2).
Differential Revision: http://reviews.llvm.org/D6064
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221176
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 3 Nov 2014 20:21:32 +0000 (20:21 +0000)]
EarlyCSE should ignore calls to @llvm.assume
EarlyCSE uses a simple generation scheme for handling memory-based
dependencies, and calls to @llvm.assume (which are marked as writing to memory
to ensure the preservation of control dependencies) disturb that scheme
unnecessarily. Skipping calls to @llvm.assume is legal, and the alternative
(adding AA calls in EarlyCSE) is likely undesirable (we have GVN for that).
Fixes PR21448.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221175
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Nov 2014 19:49:05 +0000 (19:49 +0000)]
Reapply: R600: Make sure to inline all internal functions
Function calls aren't supported yet.
This was reverted due to build breakages, which should be fixed now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221173
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 3 Nov 2014 19:11:30 +0000 (19:11 +0000)]
[Reassociate] Canonicalize negative constants out of expressions.
This gives CSE/GVN more options to eliminate duplicate expressions.
This is a follow up patch to http://reviews.llvm.org/D4904.
http://reviews.llvm.org/D5363
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221171
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 3 Nov 2014 18:22:42 +0000 (18:22 +0000)]
Relax the LLVM_NOEXCEPT _MSC_VER version check back to 1900
Unconditional noexcept support was added in the VS 2013 Nov CTP. Given
that there have been three CTPs since then, I don't think we need
careful macro magic to target that specific tech preview. Instead,
target the major release version number of 1900, which corresponds to
the as-yet unreleased VS "14".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221169
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Mon, 3 Nov 2014 18:19:26 +0000 (18:19 +0000)]
Normally an 'optnone' function goes through fast-isel, which does not
call DAGCombiner. But we ran into a case (on Windows) where the
calling convention causes argument lowering to bail out of fast-isel,
and we end up in CodeGenAndEmitDAG() which does run DAGCombiner.
So, we need to make DAGCombiner check for 'optnone' after all.
Commit includes the test that found this, plus another one that got
missed in the original optnone work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221168
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 3 Nov 2014 18:13:57 +0000 (18:13 +0000)]
IR: MDNode => Value: Instruction::getAllMetadataOtherThanDebugLoc()
Change `Instruction::getAllMetadataOtherThanDebugLoc()` from a vector of
`MDNode` to one of `Value`. Part of PR21433.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221167
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 3 Nov 2014 17:38:00 +0000 (17:38 +0000)]
Remove the cortex-a9-mp CPU.
This CPU definition is redundant. The Cortex-A9 is defined as
supporting multiprocessing extensions. Remove its definition and
update appropriate tests.
LLVM defines both a cortex-a9 CPU and a cortex-a9-mp CPU. The only
difference between the two CPU definitions in ARM.td is that
cortex-a9-mp contains the feature FeatureMP for multiprocessing
extensions.
This is redundant since the Cortex-A9 is defined as having
multiprocessing extensions in the TRMs. armcc also defines the
Cortex-A9 as having multiprocessing extensions by default.
Change-Id: Ifcadaa6c322be0a33d9d2a39cfdd7da1d75981a7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221166
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Nov 2014 17:10:38 +0000 (17:10 +0000)]
Cleanup some unused or trivial functions in DwarfCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221164
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 3 Nov 2014 16:40:43 +0000 (16:40 +0000)]
Sink DwarfUnit::CURanges into DwarfCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221161
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 3 Nov 2014 15:28:40 +0000 (15:28 +0000)]
[AArch64] Fix miscompile of comparison with 0xffffffffffffffff
Some literals in the AArch64 backend had 15 'f's rather than 16, causing
comparisons with a constant 0xffffffffffffffff to be miscompiled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221157
91177308-0d34-0410-b5e6-
96231b3b80d8
Sid Manning [Mon, 3 Nov 2014 14:56:05 +0000 (14:56 +0000)]
Handle ctor/init_array initialization.
Hexagon was not calling InitializeELF and could not select between
ctors and init_array.
Phabricator revision: http://reviews.llvm.org/D6061
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221156
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 3 Nov 2014 14:52:00 +0000 (14:52 +0000)]
Merge the directive-eabi_attribute.s and directive-eabi_attribute-2.s tests.
test/MC/ARM/directive-eabi_attribute.s had gotten out-of-sync with
test/MC/ARM/directive-eabi_attribute-2.s. The former tests the encoding of
build attributes in object files, and the latter the encoding in assembly
files. Since both these tests need to be updated at the same time, it makes
sense to combine them into a single test. The object file encodings are being
checked against the ouput of -arm-attributes rather than by direct byte
comparisons which makes for easier reading.
Change-Id: I0075de506ae5626fb2fa235383fe5ce6a65a15a9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221155
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 3 Nov 2014 14:09:47 +0000 (14:09 +0000)]
Add CRLF support to LineIterator.
The MRI scripts have to work with CRLF, and in general it is probably
a good idea to support this in a core utility like LineIterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221153
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 3 Nov 2014 12:19:03 +0000 (12:19 +0000)]
Revert r221150, as it broke sanitizer tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221151
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 3 Nov 2014 12:02:51 +0000 (12:02 +0000)]
Emit .eh_frame with relocations to functions, rather than sections
When LLVM emits DWARF call frame information, it currently creates a local,
section-relative symbol in the code section, which is pointed to by a
relocation on the .eh_frame section. However, for C++ we emit some functions in
section groups, and the SysV ABI has some rules to make it easier to remove
these sections
(http://www.sco.com/developers/gabi/latest/ch4.sheader.html#section_group_rules):
A symbol table entry with STB_LOCAL binding that is defined relative to one
of a group's sections, and that is contained in a symbol table section that is
not part of the group, must be discarded if the group members are discarded.
References to this symbol table entry from outside the group are not allowed.
This means that we need to use the function symbol for the relocation, not a
temporary symbol.
There was a comment in the code claiming that the local symbol was used to
avoid creating a relocation, but a relocation must be created anyway as the
code and CFI are in different sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221150
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 3 Nov 2014 11:47:14 +0000 (11:47 +0000)]
[OCaml] Fix mismatched CAMLparam/CAMLreturn.
Also, revert r221142--it was an incorrect fix to this bug
which fixed tests by accident.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221149
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 3 Nov 2014 10:58:05 +0000 (10:58 +0000)]
Test commit.
Fixes two typos.
Change-Id: I129f647de8933e1d8f0dc9941bcb91602edce7e2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221148
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 3 Nov 2014 10:38:26 +0000 (10:38 +0000)]
CMake: Add libm to list of system libs printed by llvm-config.
This is required by the interpreter library, and also matches the autoconf
behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221147
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 3 Nov 2014 10:14:57 +0000 (10:14 +0000)]
[mips] Remove unused prototype and variable. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221146
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 3 Nov 2014 10:06:19 +0000 (10:06 +0000)]
[OCaml] Add -g on DEBUG_SYMBOLS=1, not ENABLE_OPTIMIZED.
Thanks echristo for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221145
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 3 Nov 2014 09:58:41 +0000 (09:58 +0000)]
Unbreak build.
A bug in lit.cfg was introduced in r221137.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221144
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 3 Nov 2014 09:51:47 +0000 (09:51 +0000)]
[OCaml] Don't use deprecated non-caml_namespaced functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221143
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 3 Nov 2014 09:51:44 +0000 (09:51 +0000)]
[OCaml] Initialize local roots prior to raising.
On 4.02, the OCaml unwinder otherwise gets confused and segfaults.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221142
91177308-0d34-0410-b5e6-
96231b3b80d8