Zachary Turner [Fri, 27 Feb 2015 09:15:31 +0000 (09:15 +0000)]
[llvm-pdbdump] Fix warnings found by clang-cl self host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230745
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 27 Feb 2015 09:15:18 +0000 (09:15 +0000)]
[llvm-pdbdump] Add support for dumping global variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230744
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 27 Feb 2015 09:11:38 +0000 (09:11 +0000)]
[x86] Make the single-input v8i16 lowering directly recurse rather than
going back through the entire vector shuffle lowering.
This is an important step to being able to re-use this logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230743
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Fri, 27 Feb 2015 09:01:39 +0000 (09:01 +0000)]
[mips] Account for constant-zero operands in ADDE nodes.
Summary:
We identify the cases where the operand to an ADDE node is a constant
zero. In such cases, we can avoid generating an extra ADDu instruction
disguised as an identity move alias (ie. addu $r, $r, 0 --> move $r, $r).
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230742
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 27 Feb 2015 03:12:36 +0000 (03:12 +0000)]
[asan] Skip promotable allocas to improve performance at -O0
Currently, the ASan executables built with -O0 are unnecessarily slow.
The main reason is that ASan instrumentation pass inserts redundant
checks around promotable allocas. These allocas do not get instrumented
under -O1 because they get converted to virtual registered by mem2reg.
With this patch, ASan instrumentation pass will only instrument non
promotable allocas, giving us a speedup of 39% on a collection of
benchmarks with -O0. (There is no measurable speedup at -O1.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230724
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 27 Feb 2015 02:24:16 +0000 (02:24 +0000)]
Don't modify the DenseMap being iterated over from within the loop
that is iterating over it
Inserting elements into a `DenseMap` invalidated iterators pointing
into the `DenseMap` instance.
Differential Revision: http://reviews.llvm.org/D7924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230719
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 27 Feb 2015 02:19:11 +0000 (02:19 +0000)]
Fix a use-iterator-after-invalidate error
AnalysisResult::getResultImpl reuses an iterator into a DenseMap after
inserting elements into it. This change adds code to recompute the
iterator before the second use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230718
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Fri, 27 Feb 2015 00:57:01 +0000 (00:57 +0000)]
Target/X86: Save Win64 non-volatile registers in a Win64 ABI function.
Summary:
This change causes us to actually save non-volatile registers in a Win64
ABI function that calls a System V ABI function, and vice-versa.
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7919
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230714
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 27 Feb 2015 00:43:58 +0000 (00:43 +0000)]
llvm-vtabledump: Dump catch/throw exception structures for MS ABI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230713
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 27 Feb 2015 00:11:34 +0000 (00:11 +0000)]
Rewrite MachineOperand::print and MachineInstr::print to avoid
uses of TM->getSubtargetImpl and propagate to all calls.
This could be a debugging regression in places where we had a
TargetMachine and/or MachineFunction but don't have it as part
of the MachineInstr. Fixing this would require passing a
MachineFunction/Function down through the print operator, but
none of the existing uses in tree seem to do this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230710
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 26 Feb 2015 23:55:11 +0000 (23:55 +0000)]
Put jump tables in distinct sections if -ffunction-sections is used.
A small regression in r230411 was that we were basing the decision on
-fdata-sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230707
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 26 Feb 2015 23:52:42 +0000 (23:52 +0000)]
[Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230705
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 26 Feb 2015 23:51:49 +0000 (23:51 +0000)]
[llvm-pdbdump] Add missing files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230704
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 26 Feb 2015 23:49:23 +0000 (23:49 +0000)]
[llvm-pdbdump] Fix dumping of function pointers and basic types.
Function pointers were not correctly handled by the dumper, and
they would print as "* name". They now print as
"int (__cdecl *name)(int arg1, int arg2)" as they should.
Also, doubles were being printed as floats. This fixes that bug
as well, and adds tests for all builtin types. as well as a test
for function pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230703
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 23:36:28 +0000 (23:36 +0000)]
Remove commented out function.
(Saving files works, who knew?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230701
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 23:32:17 +0000 (23:32 +0000)]
Remove DebugLoc::print(LLVMContext, raw_ostream), it was just
forwarding to the one that didn't take a context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230700
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 22:38:43 +0000 (22:38 +0000)]
getRegForInlineAsmConstraint wants to use TargetRegisterInfo for
a lookup, pass that in rather than use a naked call to getSubtargetImpl.
This involved passing down and around either a TargetMachine or
TargetRegisterInfo. Update all callers/definitions around the targets
and SelectionDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230699
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 22:38:34 +0000 (22:38 +0000)]
Add a TargetMachine argument to the AddressingModeMatcher, we'll
need this shortly to get a TargetRegisterInfo from the subtarget
for TargetLowering routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230698
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Feb 2015 22:15:34 +0000 (22:15 +0000)]
[x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamic
blend as legal.
We made the same mistake in two different places. Whenever we are custom
lowering a v32i8 blend we need to check whether we are custom lowering
it only for constant conditions that can be shuffled, or whether we
actually have AVX2 and full dynamic blending support on bytes. Both are
fixed, with comments added to make it clear what is going on and a new
test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230695
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 26 Feb 2015 22:02:02 +0000 (22:02 +0000)]
Simplify arange output.
Move SectionMap to its only user (emitDebugARanges) and
reorder to save a call to sort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230693
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 26 Feb 2015 21:34:11 +0000 (21:34 +0000)]
Re-instate the pragma optimize hack for MSVC, but not clang-cl
Reverts commit r230686 with define modifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230692
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Feb 2015 21:29:06 +0000 (21:29 +0000)]
[x86] Restructure the comments and the conditions for handling
dynamic blends.
This makes it much more clear what is going on. The case we're handling
is that of dynamic conditions, and we're bailing when the nature of the
vector types and subtarget preclude lowering the dynamic condition
vselect as an actual blend.
No functionality changed here, but this will make a subsequent bug-fix
to this code much more clear.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230690
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Feb 2015 21:21:36 +0000 (21:21 +0000)]
[x86] Re-order the combines of select in the X86 backend. This doesn't
change functionality, but makes it more clear that the dynamic case and
the shuffle case don't overlap in any interesting way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230689
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Feb 2015 21:18:20 +0000 (21:18 +0000)]
[x86] Add an assert to catch if we ever try to blend a v32i8 without
AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230688
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 26 Feb 2015 21:08:27 +0000 (21:08 +0000)]
Remove stale pragma hack for an unsupported MSVC version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230686
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 26 Feb 2015 21:08:21 +0000 (21:08 +0000)]
Silence some Win64 clang-cl warnings about unused stuff due to ifdefs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230685
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 26 Feb 2015 21:07:30 +0000 (21:07 +0000)]
Use wider type for overflow check on LLP64 platforms like Win64, found by clang-cl -Wtautological
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230684
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 26 Feb 2015 20:14:32 +0000 (20:14 +0000)]
IRCE: add a test case for r230619.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230680
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 26 Feb 2015 20:06:28 +0000 (20:06 +0000)]
InstrProf: Simplify the construction of BinaryCoverageReader
Creating BinaryCoverageReader is a strange and complicated dance where
the constructor sets error codes that member functions will later
read, and the object is in an invalid state if readHeader isn't
immediately called after construction.
Instead, make the constructor private and add a static create method
to do the construction properly. This also has the benefit of removing
readHeader completely and simplifying the interface of the object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230676
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 26 Feb 2015 20:06:24 +0000 (20:06 +0000)]
InstrProf: Rename ObjectFileCoverageMappingReader to BinaryCoverageReader
The current name is long and confusing. A shorter one is both easier
to understand and easier to work with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230675
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 26 Feb 2015 19:51:35 +0000 (19:51 +0000)]
SCEVExpander incorrectly marks generated subtractions as nuw/nsw
It is not sound to mark the increment operation as `nuw` or `nsw`
based on a proof off of the add recurrence if the increment operation
we emit happens to be a `sub` instruction.
I could not come up with a test case for this -- the cases where
SCEVExpander decides to emit a `sub` instruction is quite small, and I
cannot think of a way I'd be able to get SCEV to prove that the
increment does not overflow in those cases.
Differential Revision: http://reviews.llvm.org/D7899
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230673
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 26 Feb 2015 19:48:43 +0000 (19:48 +0000)]
Try to fix a docs link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230672
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 26 Feb 2015 19:48:07 +0000 (19:48 +0000)]
[MC] Use the non-EH register mapping in the debug_frame section.
On 32bits x86 Darwin, the register mappings for the eh_frane and
debug_frame sections are different. Thus the same CFI instructions
should result in different registers in the object file. The
problem isn't target specific though, but it requires that the
mappings for EH register numbers be different from the standard
Dwarf one.
The patch looks a bit clumsy. LLVM uses the EH mapping as
canonical for everything frame related. Thus we need to do a
double conversion EH -> LLVM -> Non-EH, when emitting the
debug_frame section.
Fixes PR22363.
Differential Revision: http://reviews.llvm.org/D7593
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230670
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 19:46:32 +0000 (19:46 +0000)]
Support bitrig in autoconf build system.
Patch by Dave Huseby.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230669
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 26 Feb 2015 19:43:20 +0000 (19:43 +0000)]
Don't sibcall between SysV and Win64 convention functions
The shadow stack space expectations won't match.
Fixes PR22709.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230667
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 26 Feb 2015 19:28:37 +0000 (19:28 +0000)]
[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230664
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 26 Feb 2015 18:56:03 +0000 (18:56 +0000)]
[InstCombine/PowerPC] Convert aligned QPX load/store intrinsics into loads/stores
InstCombine has long had logic to convert aligned Altivec load/store intrinsics
into regular loads and stores. This mirrors that functionality for QPX vector
load/store intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230660
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Thu, 26 Feb 2015 18:47:57 +0000 (18:47 +0000)]
When the source has a series of assignments, users reasonably want to
have the debugger step through each one individually. Turn off the
combine for adjacent stores at -O0 so we get this behavior.
Possibly, DAGCombine shouldn't run at all at -O0, but that's for
another day; see PR22346.
Differential Revision: http://reviews.llvm.org/D7181
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230659
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 26 Feb 2015 18:36:34 +0000 (18:36 +0000)]
[Orc][Kaleidoscope] More diff-reduction between tutorial versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230658
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Jovanovic [Thu, 26 Feb 2015 18:35:15 +0000 (18:35 +0000)]
Fix justify error for small structures in varargs for MIPS64BE
There was a problem when passing structures as variable arguments.
The structures smaller than 64 bit were not left justified on MIPS64
big endian. This is now fixed by shifting the value to make it left-
justified when appropriate.
This fixes the bug http://llvm.org/bugs/show_bug.cgi?id=21608
Patch by Aleksandar Beserminji.
Differential Revision: http://reviews.llvm.org/D7881
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230657
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 26 Feb 2015 18:24:37 +0000 (18:24 +0000)]
gold-plugin: "Upgrade" debug info and handle its warnings.
The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.
Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230655
91177308-0d34-0410-b5e6-
96231b3b80d8
Sumanth Gundapaneni [Thu, 26 Feb 2015 18:08:41 +0000 (18:08 +0000)]
Use ".arch_extension" ARM directive to support hwdiv on krait
In case of "krait" CPU, asm printer doesn't emit any ".cpu" so the
features bits are not computed. This patch lets the asm printer
emit ".cpu cortex-a9" directive for krait and the hwdiv feature is
enabled through ".arch_extension". In short, krait is treated
as "cortex-a9" with hwdiv. We can not emit ".krait" as CPU since
it is not supported bu GNU GAS yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230651
91177308-0d34-0410-b5e6-
96231b3b80d8
Sumanth Gundapaneni [Thu, 26 Feb 2015 18:07:35 +0000 (18:07 +0000)]
Use ".arch_extension" ARM directive to specify the additional CPU features
This patch is in response to r223147 where the avaiable features are
computed based on ".cpu" directive. This will work clean for the standard
variants like cortex-a9. For custom variants which rely on standard cpu names
for assembly, the additional features of a CPU should be propagated. This can be
done via ".arch_extension" as long as the assembler supports it. The
implementation for krait along with unit test will be submitted in next patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230650
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 26 Feb 2015 17:58:48 +0000 (17:58 +0000)]
[LV/LoopAccesses] Backward dependences are not safe just because the
accesses are via different types
Noticed this while generalizing the code for loop distribution.
I confirmed with Arnold that this was indeed a bug and managed to create
a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230647
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 26 Feb 2015 17:08:43 +0000 (17:08 +0000)]
R600/SI: Remove M0 from DS assembly strings
This matches the assembly syntax for the proprietary compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230645
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 26 Feb 2015 15:16:09 +0000 (15:16 +0000)]
[X86][MMX] Fix a typo in a couple of tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230638
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 26 Feb 2015 15:10:38 +0000 (15:10 +0000)]
[X86][MMX] Remove widening experimental flag from MMX tests.
Turns out that after the past MMX commits, we don't need to rely on this
flag to get better codegen for MMX. Also update the tests to become
triple neutral.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230637
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 26 Feb 2015 14:30:09 +0000 (14:30 +0000)]
[X86][Haswell][SchedModel] Fix WriteMULm latency.
The latency for the WriteMULm class was set to 4, which is actually lower than the latency for WriteMULr (5).
A better estimate would be 4 added to WriteMULr, that is, 9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230634
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 26 Feb 2015 14:22:41 +0000 (14:22 +0000)]
[InstCombine] Add a test for altivec load/store intrinsic simplification
InstCombine has logic to convert aligned Altivec load/store intrinsics into
regular loads and stores. Unfortunately, there seems to be no regression test
covering this behavior. Adding one...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230632
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Thu, 26 Feb 2015 12:29:48 +0000 (12:29 +0000)]
Replace obsolete -mattr=n64 command line option with -target-abi=n64. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230628
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Feb 2015 11:00:40 +0000 (11:00 +0000)]
[x86] Sink the single-input v8i16 lowering code that is actually
formulaic into the top v8i16 lowering routine.
This makes the generalized lowering a completely general and single path
lowering which will allow generalizing it in turn for multiple 128-bit
lanes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230623
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Feb 2015 10:37:01 +0000 (10:37 +0000)]
[x86] Remove a SimpleTy usage. No need for it here, we already have the
MVT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230622
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 26 Feb 2015 08:56:04 +0000 (08:56 +0000)]
IRCE: only touch loops that have been shown to have a high
backedge-taken count in profiliing data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230619
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 26 Feb 2015 08:19:31 +0000 (08:19 +0000)]
IRCE: generalize to handle loops with decreasing induction variables.
IRCE can now split the iteration space for loops like:
for (i = n; i >= 0; i--)
a[i + k] = 42; // bounds check on access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230618
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Feb 2015 08:19:24 +0000 (08:19 +0000)]
[x86] Make the vector shuffle helpers order the SDLoc and MVT arguments.
This ordering matches that of DAG.getNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230617
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 05:00:42 +0000 (05:00 +0000)]
IR: Use '= default' instead of r230609, NFC
Apparently we can use this now!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230613
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:53:00 +0000 (04:53 +0000)]
FileCheck: Add CHECK-SAME
Add `CHECK-SAME`, which requires that the pattern matches on the *same*
line as the previous `CHECK`/`CHECK-NEXT` -- in other words, no newline
is allowed in the skipped region. This is similar to `CHECK-NEXT`,
which requires exactly 1 newline in the skipped region.
My motivation is to simplify checking the long lines of LLVM assembly
for the new debug info hierarchy. This allows CHECK sequences like the
following:
CHECK: ![[REF]] = !SomeMDNode(
CHECK-SAME: file: ![[FILE:[0-9]+]]
CHECK-SAME: otherField: 93{{[,)]}}
which is equivalent to:
CHECK: ![[REF]] = !SomeMDNode({{.*}}file: ![[FILE:[0-9]+]]{{.*}}otherField: 93{{[,)]}}
While this example just has two fields, many nodes in debug info have
more than that. `CHECK-SAME` will keep the logic easy to follow.
Morever, it enables interleaving `CHECK-NOT`s without allowing newlines.
Consider the following:
CHECK: ![[REF]] = !SomeMDNode(
CHECK-SAME: file: ![[FILE:[0-9]+]]
CHECK-NOT: unexpectedField:
CHECK-SAME: otherField: 93{{[,)]}}
CHECK-NOT: otherUnexpectedField:
CHECK-SAME: )
which doesn't seem to have an equivalent `CHECK` line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230612
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:41:10 +0000 (04:41 +0000)]
IR: Add default constructor for DIImportedEntity
Add a default constructor for `DIImportedEntity`, to be used in clang in
a follow-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230609
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 26 Feb 2015 04:39:09 +0000 (04:39 +0000)]
[LoopAccesses] Add command-line option for RuntimeMemoryCheckThreshold
Also remove the somewhat misleading initializers from
VectorizationFactor and VectorizationInterleave. They will get
initialized with the default ctor since no cl::init is provided.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230608
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 26 Feb 2015 04:03:31 +0000 (04:03 +0000)]
IRCE: print newline after printing an InductiveRangeCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230607
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 26 Feb 2015 01:18:21 +0000 (01:18 +0000)]
[GC docs] Add example IR, assembly, and stackmaps to Statepoint documentation
When I originally committed the statepoint docs, I left placeholders for example IR fragments. I'm finally getting around to filling those in.
I also added IR fragments to illustrate the usage of the PlaceSafepoints pass while I was at it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230601
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 26 Feb 2015 01:10:49 +0000 (01:10 +0000)]
Replace a few instances of NULL with nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230599
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 26 Feb 2015 00:51:33 +0000 (00:51 +0000)]
Pass /nologo to ml64 for quieter builds
It still prints "Assembling path/to/X86CompilationCallback_Win64.asm",
but linking does the same thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230596
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Thu, 26 Feb 2015 00:35:56 +0000 (00:35 +0000)]
PlaceSafepoints: use IRBuilder helpers
Use the IRBuilder helpers for gc.statepoint and gc.result, instead of
coding the construction by hand. Note that the gc.statepoint IRBuilder
handles only CallInst, not InvokeInst; retain that part of hand-coding.
Differential Revision: http://reviews.llvm.org/D7518
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230591
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 00:00:35 +0000 (00:00 +0000)]
Remove a FIXME.
Explanation: This function is in TargetLowering because it uses
RegClassForVT which would need to be moved to TargetRegisterInfo
and would necessitate moving isTypeLegal over as well - a massive
change that would just require TargetLowering having a TargetRegisterInfo
class member that it would use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230585
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 00:00:33 +0000 (00:00 +0000)]
Fix a couple of depedent->dependent typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230584
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Feb 2015 00:00:24 +0000 (00:00 +0000)]
Remove an argument-less call to getSubtargetImpl from TargetLoweringBase.
This required plumbing a TargetRegisterInfo through computeRegisterProperties
and into findRepresentativeClass which uses it for register class
iteration. This required passing a subtarget into a few target specific
initializations of TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230583
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Wed, 25 Feb 2015 23:55:00 +0000 (23:55 +0000)]
MemDepPrinter: Fix some nits introduced in r228596
Differential Revision: http://reviews.llvm.org/D7644
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230582
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 25 Feb 2015 23:52:06 +0000 (23:52 +0000)]
[GC docs] More minor word tweaks to make the GC bits clearer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230581
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 25 Feb 2015 23:45:20 +0000 (23:45 +0000)]
[GC Docs] Update LangRef to link to Statepoint docs
Add a brief section linking to the experimental statepoint intrinsics analogous to the one we have linking to patchpoint.
While I'm here, cleanup some wording about what the gc "name" attribute actually means. It's not the name of a *collector* it's the name of the *strategy* which may be compatible with multiple collectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230576
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 25 Feb 2015 23:22:43 +0000 (23:22 +0000)]
[GC docs] Fill in description of the statepoint-example GC strategy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230572
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 25 Feb 2015 23:07:34 +0000 (23:07 +0000)]
[GC Docs] Minor wording clarification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230570
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 25 Feb 2015 22:59:20 +0000 (22:59 +0000)]
Object: Handle Mach-O kext bundle files
This particular subtype of Mach-O was missing. Add it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230567
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 25 Feb 2015 22:52:20 +0000 (22:52 +0000)]
InstrProf: Make the __llvm_profile_runtime_user symbol hidden
This symbol exists only to pull in the required pieces of the runtime,
so nothing ever needs to refer to it. Making it hidden avoids the
potential for issues with duplicate symbols when linking profiled
libraries together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230566
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 25 Feb 2015 22:46:38 +0000 (22:46 +0000)]
IR: Drop newline from AssemblyWriter::printMDNodeBody()
Remove a newline from `AssemblyWriter::printMDNodeBody()`, and add one
to `AssemblyWriter::writeMDNode()`. NFCI for assembly output.
However, this drops an inconsistent newline from `Metadata::print()`
when `this` is an `MDNode`. Now the newline added by `Metadata::dump()`
won't look so verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230565
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 25 Feb 2015 22:46:08 +0000 (22:46 +0000)]
only propagate equality comparisons of FP values that we are certain are non-zero
This is a follow-on to r227491 which tightens the check for propagating FP
values. If a non-constant value happens to be a zero, we would hit the same
bug as before.
Bug noted and patch suggested by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230564
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 25 Feb 2015 22:44:50 +0000 (22:44 +0000)]
InstrProf: Remove dead code in CoverageMappingReader
Remove a default argument that's never passed and a constructor that's
never called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230563
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 25 Feb 2015 22:41:30 +0000 (22:41 +0000)]
Move TargetLoweringBase::getTypeConversion to the .cpp file from
the .h file. It's used in only one place (other than recursively)
and there's no need to include it everywhere.
Saves almost 900k from total llvm object file size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230561
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Wed, 25 Feb 2015 22:30:51 +0000 (22:30 +0000)]
InstCombine: extract instead of shuffle when performing vector/array type punning
Summary: SROA generates code that isn't quite as easy to optimize and contains unusual-sized shuffles, but that code is generally correct. As discussed in D7487 the right place to clean things up is InstCombine, which will pick up the type-punning pattern and transform it into a more obvious bitcast+extractelement, while leaving the other patterns SROA encounters as-is.
Test Plan: make check
Reviewers: jvoung, chandlerc
Subscribers: llvm-commits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230560
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 25 Feb 2015 22:30:09 +0000 (22:30 +0000)]
[dwarfdump] Fix frame info register number dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230559
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 25 Feb 2015 22:08:21 +0000 (22:08 +0000)]
IR: Annotate dump methods with LLVM_DUMP_METHOD
It turns out we have a macro to ensure that debuggers can access
`dump()` methods. Use it. Hopefully this will prevent me (and others)
from committing crimes like in r223802 (search for /10000/, or just see
the fix in r224407).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230555
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 25 Feb 2015 22:07:43 +0000 (22:07 +0000)]
Try to appease buildbots.
It seems ArrayRefs to multi-dimensional arrays confuse some compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230554
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 25 Feb 2015 21:36:59 +0000 (21:36 +0000)]
[PowerPC] Make LDtocL and friends invariant loads
LDtocL, and other loads that roughly correspond to the TOC_ENTRY SDAG node,
represent loads from the TOC, which is invariant. As a result, these loads can
be hoisted out of loops, etc. In order to do this, we need to generate
GOT-style MMOs for TOC_ENTRY, which requires treating it as a legitimate memory
intrinsic node type. Once this is done, the MMO transfer is automatically
handled for TableGen-driven instruction selection, and for nodes generated
directly in PPCISelDAGToDAG, we need to transfer the MMOs manually.
Also, we were not transferring MMOs associated with pre-increment loads, so do
that too.
Lastly, this fixes an exposed bug where R30 was not added as a defined operand of
UpdateGBR.
This problem was highlighted by an example (used to generate the test case)
posted to llvmdev by Francois Pichet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230553
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 25 Feb 2015 21:30:22 +0000 (21:30 +0000)]
[dwarfdump] Make debug_frame dump actually useful.
This adds support for pretty-printing instruction operands. The new
output looks like:
00000000 00000010 ffffffff CIE
Version: 1
Augmentation:
Code alignment factor: 1
Data alignment factor: -4
Return address column: 8
DW_CFA_def_cfa: reg4 +4
DW_CFA_offset: reg8 -4
DW_CFA_nop:
DW_CFA_nop:
00000014 00000010 00000000 FDE cie=
00000000 pc=
00000000...
00000022
DW_CFA_advance_loc: 3
DW_CFA_def_cfa_offset: +12
DW_CFA_nop:
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230551
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 25 Feb 2015 21:30:19 +0000 (21:30 +0000)]
[dwarfdump] Don't print meaningless pointer.
CIE pointers were never filled in before, and printing the pointer
is totally pointless anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230550
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 25 Feb 2015 21:30:16 +0000 (21:30 +0000)]
DWARFDebugFrame: Move some code around. NFC.
Move the FrameEntry::dumpInstructions down in the file at some
place where it can see the declarations of FDE and CIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230549
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 25 Feb 2015 21:30:13 +0000 (21:30 +0000)]
DWARFDebugFrame: Add some trivial accessors. NFC.
To be used for dumping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230548
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 25 Feb 2015 21:30:09 +0000 (21:30 +0000)]
DWARFDebugFrame: Actually collect CIEs associated with FDEs.
This is the first commit in a small series aiming at making
debug_frame dump more useful (right now it prints a list of
opeartions without their operands).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230547
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 25 Feb 2015 21:20:53 +0000 (21:20 +0000)]
[LTO API] fix memory leakage introduced at r230290.
r230290 released the LLVM module but not the LTOModule.
rdar://
19024554
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230544
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 25 Feb 2015 21:13:37 +0000 (21:13 +0000)]
X86, Win64: Allow 'mov' to restore the stack pointer if we have a FP
The Win64 epilogue structure is very restrictive, it permits a very
small number of opcodes and none of them are 'mov'.
This means that given:
mov %rbp, %rsp
pop %rbp
The mov isn't the epilogue, only the pop is. This is problematic unless
a frame pointer is present in which case we are free to do whatever we'd
like in the "body" of the function. If a frame pointer is present,
unwinding will undo the prologue operations in reverse order regardless
of the fact that we are at an instruction which is reseting the stack
pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230543
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 25 Feb 2015 20:58:28 +0000 (20:58 +0000)]
[Orc][Kaleidoscope] Clean up the Orc/Kaleidoscope tutorials to minimize the diffs
between them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230542
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 25 Feb 2015 20:42:41 +0000 (20:42 +0000)]
LowerBitSets: Align referenced globals.
This change aligns globals to the next highest power of 2 bytes, up to a
maximum of 128. This makes it more likely that we will be able to compress
bit sets with a greater alignment. In many more cases, we can now take
advantage of a new optimization also introduced in this patch that removes
bit set checks if the bit set is all ones.
The 128 byte maximum was found to provide the best tradeoff between instruction
overhead and data overhead in a recent build of Chromium. It allows us to
remove ~2.4MB of instructions at the cost of ~250KB of data.
Differential Revision: http://reviews.llvm.org/D7873
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230540
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 25 Feb 2015 20:42:19 +0000 (20:42 +0000)]
[CMake] Fix the clang-cl self host build.
This allows clang-cl to self-host cleanly with no magic setup
steps required.
After this patch, all you have to do is set CC=CXX=clang-cl and
run cmake -G Ninja.
These changes only exist to support C++ features which are
unsupported in clang-cl, so regardless of whether the user
specifies they want to use them, we still have to disable them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230539
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 25 Feb 2015 20:12:49 +0000 (20:12 +0000)]
Fixing a problem with insert location in WinEH outlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230535
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 25 Feb 2015 20:02:59 +0000 (20:02 +0000)]
Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap
(The change was landed in r230280 and caused the regression PR22674.
This version contains a fix and a test-case for PR22674).
When emitting the increment operation, SCEVExpander marks the
operation as nuw or nsw based on the flags on the preincrement SCEV.
This is incorrect because, for instance, it is possible that {-6,+,1}
is <nuw> while {-6,+,1}+1 = {-5,+,1} is not.
This change teaches SCEV to mark the increment as nuw/nsw only if it
can explicitly prove that the increment operation won't overflow.
Apart from the attached test case, another (more realistic)
manifestation of the bug can be seen in
Transforms/IndVarSimplify/pr20680.ll.
Differential Revision: http://reviews.llvm.org/D7778
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230533
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 25 Feb 2015 18:06:45 +0000 (18:06 +0000)]
[PowerPC] Cleanup unused target-specific SDAG nodes
We had somehow accumulated a few target-specific SDAG nodes dealing with PPC64
TOC access that were referenced only in TableGen patterns. The associated
(pseudo-)instructions are used, but are being generated directly. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230518
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 25 Feb 2015 18:03:50 +0000 (18:03 +0000)]
AArch64: Add debug message for large shift constants.
As requested in code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230517
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 25 Feb 2015 18:00:15 +0000 (18:00 +0000)]
Fix really obscure bug in CannotBeNegativeZero() (PR22688)
With a diabolically crafted test case, we could recurse
through this code and return true instead of false.
The larger engineering crime is the use of magic numbers.
Added FIXME comments for those.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230515
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 25 Feb 2015 17:28:41 +0000 (17:28 +0000)]
fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230510
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 25 Feb 2015 15:24:37 +0000 (15:24 +0000)]
[MIPS]Multiple and add instructions for Mips are currently available in mips32r2/mips64r2 and later but should also be available in mips4, mips5, and mips64. This patch fixes the requested features and updates the corresponding test files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230500
91177308-0d34-0410-b5e6-
96231b3b80d8