Edward O'Callaghan [Sun, 15 Nov 2009 10:18:17 +0000 (10:18 +0000)]
Add PSP OS Target to Triple, Credit to Bruno Cardoso Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88849
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 08:10:29 +0000 (08:10 +0000)]
lit: Factor a new OneCommandPerFileTest out of SyntaxCheckTest.
- Used for running a single fixed command on a directory of files, with the
option of deriving a temporary input file from the test source.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88844
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Nov 2009 07:47:32 +0000 (07:47 +0000)]
Revert r88830 and r88831 which appear to have caused a selfhost buildbot some
grief. I suspect this patch merely exposed a bug else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88841
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 07:22:58 +0000 (07:22 +0000)]
Remove duplicate implementation of excludes functionality, and support excluding
dirnames.
Also, add support for the 'unsupported' config property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88838
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Nov 2009 06:16:57 +0000 (06:16 +0000)]
Correct typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88831
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Nov 2009 05:55:17 +0000 (05:55 +0000)]
Teach instcombine to look for booleans in wider integers when it encounters a
zext(icmp). It may be able to optimize that away. This fixes one of the cases
in PR5438.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88830
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 15 Nov 2009 04:39:51 +0000 (04:39 +0000)]
Added an assert to the PBQP allocator to catch infinite cost solutions which might otherwise lead to miscompilations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88829
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 01:02:09 +0000 (01:02 +0000)]
lit: Add --repeat=N option, for running each test N times.
- Currently just useful for timing, although it could be extended as one (bad) way to deal with flaky tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88827
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 22:04:42 +0000 (22:04 +0000)]
Remove bogus corei7 and atom entries, the family was incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88818
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 14 Nov 2009 21:57:35 +0000 (21:57 +0000)]
remove xfail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88817
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 21:36:19 +0000 (21:36 +0000)]
Fill out X86 table, although we are missing lots of names for things. We now
properly detect my Xeon box though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88814
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 21:36:07 +0000 (21:36 +0000)]
Report the detected host CPU in --version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88813
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 14 Nov 2009 21:33:37 +0000 (21:33 +0000)]
cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88812
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 14 Nov 2009 20:15:03 +0000 (20:15 +0000)]
Do not merge jump tables this early. Branch folding will do any necessary
merges, and until then, it's useful to keep the tables separate for ease
of manipulation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88806
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 14 Nov 2009 20:10:18 +0000 (20:10 +0000)]
Cleanup flow, and only update the jump table we're analyzing when replacing a destination MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88805
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 14 Nov 2009 20:09:13 +0000 (20:09 +0000)]
Add function to replace a destination MBB in a single jump table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88804
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 14 Nov 2009 19:51:20 +0000 (19:51 +0000)]
Remove dead variable found by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88803
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Sat, 14 Nov 2009 19:33:35 +0000 (19:33 +0000)]
Add XCore support for arbitrary-sized aggregate returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88802
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 14 Nov 2009 18:01:41 +0000 (18:01 +0000)]
Temporary disable the error - it seems to be too conservative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88800
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 14 Nov 2009 16:37:18 +0000 (16:37 +0000)]
Implement DISABLE_INLINE for MSVC. This required changing the position in all
forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88798
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 14 Nov 2009 15:15:39 +0000 (15:15 +0000)]
This test doesn't work on arm either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88794
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 14 Nov 2009 14:14:58 +0000 (14:14 +0000)]
Make NORETURN working with MSVC. MSVC only accepts NORETURN in front of the
decl so move it there. GCC accepts it both in front and after decls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88791
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 10:09:12 +0000 (10:09 +0000)]
Add llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
- This is an initial step towards -march=native support in Clang, and towards
eliminating host dependencies in the targets. See PR5389.
- Patch by Roman Divacky!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88768
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 14 Nov 2009 07:25:54 +0000 (07:25 +0000)]
Remove LLVMContext from reassociate. It was threaded through every function but
ultimately never used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88763
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Sat, 14 Nov 2009 07:22:25 +0000 (07:22 +0000)]
revert 88761 as it fails builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88762
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Sat, 14 Nov 2009 06:19:49 +0000 (06:19 +0000)]
Fix debug info crashes for PIC16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88761
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 14 Nov 2009 06:15:14 +0000 (06:15 +0000)]
Teach BasicAA that a constant expression can't alias memory provably not
allocated until runtime (such as an alloca). Patch by Hans Wennborg!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88760
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 14 Nov 2009 03:42:17 +0000 (03:42 +0000)]
Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88753
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 14 Nov 2009 02:55:43 +0000 (02:55 +0000)]
- Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
- If destination is a physical register and it has a subreg index, use the
sub-register instead.
This fixes PR5423.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88745
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Nov 2009 02:27:51 +0000 (02:27 +0000)]
Add an option for running GVN with redundant load processing disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88742
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 14 Nov 2009 02:11:32 +0000 (02:11 +0000)]
Add radar number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88739
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 14 Nov 2009 02:09:09 +0000 (02:09 +0000)]
Fix PR5412: Fix an inverted check and another missing sub-register check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88738
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Nov 2009 02:06:30 +0000 (02:06 +0000)]
Enable the tail call optimization when the caller returns undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88737
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 14 Nov 2009 01:50:00 +0000 (01:50 +0000)]
When expanding t2STRDi8 r, r to two stores, add kill markers correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88734
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 14 Nov 2009 00:38:13 +0000 (00:38 +0000)]
Fix bug in -split-phi-edges.
When splitting an edge after a machine basic block with fall-through, we
forgot to insert a jump instruction. Fix this by calling updateTerminator() on
the fall-through block when relevant.
Also be more precise in PHIElimination::isLiveIn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88728
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 14 Nov 2009 00:38:06 +0000 (00:38 +0000)]
Update MachineDominator information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88727
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 14 Nov 2009 00:02:51 +0000 (00:02 +0000)]
Added an API to the SlotIndexes pass to allow new instructions to be inserted into the numbering.
PreAllocSplitting is now using this API to insert code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88725
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 13 Nov 2009 23:16:41 +0000 (23:16 +0000)]
Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88719
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Nov 2009 23:08:47 +0000 (23:08 +0000)]
Remove extraneous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88716
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Nov 2009 23:00:14 +0000 (23:00 +0000)]
Print out something, even if it's non-parseable later when we've
got ghost linkage. It's better than aborting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88715
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2009 22:24:13 +0000 (22:24 +0000)]
Move the FixedStackPseudoSourceValueVal enum value before InstructionVal
so that isa<Instructon> doesn't return true for FixedStackPseudoSourceValue
values. This fixes a variety of problems, including crashes with -debug
and -print-machineinstrs. Also, add a comment to warn about this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88711
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 13 Nov 2009 21:58:54 +0000 (21:58 +0000)]
Disable the JITTest.NoStubs test for Darwin PPC. It apparently doesn't implement
emitFunctionStubAtAddr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88708
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Nov 2009 21:56:15 +0000 (21:56 +0000)]
Fix PHIElimination optimization that uses MBB->getBasicBlock.
The BasicBlock associated with a MachineBasicBlock does not necessarily
correspond to the code in the MBB.
Don't insert a new IR BasicBlock when splitting critical edges. We are not
supposed to modify the IR during codegen, and we should be able to do just
fine with a NULL BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88707
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Nov 2009 21:56:09 +0000 (21:56 +0000)]
Add MachineFunction::verify() to call the machine code verifier directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88706
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Nov 2009 21:56:01 +0000 (21:56 +0000)]
The instruction pointer %RIP is a reserved register on x86_64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88705
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 13 Nov 2009 21:55:54 +0000 (21:55 +0000)]
Fix polarity of a CFG check in machine verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88704
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2009 21:55:31 +0000 (21:55 +0000)]
Use .data() instead of .c_str() when nul-termination is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88703
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 13 Nov 2009 21:45:04 +0000 (21:45 +0000)]
Do not use value handle to wrap MDNode in DIDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88700
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 13 Nov 2009 21:34:57 +0000 (21:34 +0000)]
Move DebugInfo checks into EmitComments and remove them from
target-specific AsmPrinters. Not all comments need DebugInfo.
Re-enable the line numbers comment test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88697
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2009 21:02:15 +0000 (21:02 +0000)]
When optimizing for size, don't tail-merge unless it's likely to be a
code-size win, and not when it's only likely to be code-size neutral,
such as when only a single instruction would be eliminated and a new
branch would be required.
This fixes rdar://
7392894.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88692
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 13 Nov 2009 20:36:40 +0000 (20:36 +0000)]
Fix PR5410: LiveVariables lost subreg def:
D0<def,dead> = ...
...
= S0<use, kill>
S0<def> = ...
...
D0<def> =
The first D0 def is correctly marked dead, however, livevariables should have
added an implicit def of S0 or we end up with a use without a def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88690
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Fri, 13 Nov 2009 19:52:48 +0000 (19:52 +0000)]
Allow target to specify regclass for which antideps will only be broken along the critical path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88682
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 13 Nov 2009 18:49:59 +0000 (18:49 +0000)]
Support fp64 immediate zero, this fixes only part of PR5445
because the testcase is triggering one more bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88674
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2009 18:49:38 +0000 (18:49 +0000)]
Don't let a noalias difference disrupt the tailcall optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88672
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 13 Nov 2009 14:42:06 +0000 (14:42 +0000)]
Remove duplicate APIs and state WRT spill objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87106
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Nov 2009 04:55:09 +0000 (04:55 +0000)]
Distinguish "a," from "a". The first one splits into "a" + "" and the second one into
"a" + 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87084
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 13 Nov 2009 02:27:33 +0000 (02:27 +0000)]
Revert r87059 for now. It is failing clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87070
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 13 Nov 2009 02:25:26 +0000 (02:25 +0000)]
Ignore nameless variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87069
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Nov 2009 02:18:25 +0000 (02:18 +0000)]
Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87068
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 13 Nov 2009 01:45:18 +0000 (01:45 +0000)]
Adjust isConstantSplat to allow for big-endian targets.
PPC is such a target; make it work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87060
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 13 Nov 2009 01:44:55 +0000 (01:44 +0000)]
Remove unnecessary llvm.dbg.declare bitcast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87059
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Nov 2009 01:24:40 +0000 (01:24 +0000)]
Add a new split method to StringRef that puts the substrings in a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87058
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 13 Nov 2009 01:19:24 +0000 (01:19 +0000)]
Block renumbering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87056
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 13 Nov 2009 01:17:22 +0000 (01:17 +0000)]
use lower case for readability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87054
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 01:01:58 +0000 (01:01 +0000)]
Update test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87049
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 13 Nov 2009 00:29:53 +0000 (00:29 +0000)]
Fix a bootstrap failure.
Provide special isLoadFromStackSlotPostFE and isStoreToStackSlotPostFE
interfaces to explicitly request checking for post-frame ptr elimination
operands. This uses a heuristic so it isn't reliable for correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87047
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 12 Nov 2009 23:22:41 +0000 (23:22 +0000)]
Re-enable this code, since redundant PHIs are now being better nuked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87042
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 12 Nov 2009 23:13:08 +0000 (23:13 +0000)]
Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87040
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 12 Nov 2009 21:59:20 +0000 (21:59 +0000)]
Refactor code that checks if it's a call to a "nounwind" function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87036
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Nov 2009 21:58:18 +0000 (21:58 +0000)]
use isInstructionTriviallyDead, as pointed out by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87035
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 21:49:55 +0000 (21:49 +0000)]
Do some cleanups suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87034
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 21:26:11 +0000 (21:26 +0000)]
StringRef(const char*) should not be used to turn null pointers into empty
strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87031
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 21:07:54 +0000 (21:07 +0000)]
Set the ReloadReuse AsmPrinter flag where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87030
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 21:07:02 +0000 (21:07 +0000)]
Remove my Value.h build fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87029
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 21:04:19 +0000 (21:04 +0000)]
Fix a build error by providing a missing enum value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87028
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 21:00:03 +0000 (21:00 +0000)]
Make the MachineFunction argument of getFrameRegister const.
This also fixes a build error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87027
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 20:55:29 +0000 (20:55 +0000)]
Add hasLoadFromStackSlot and hasStoreToStackSlot to return whether a
machine instruction loads or stores from/to a stack slot. Unlike
isLoadFromStackSlot and isStoreFromStackSlot, the instruction may be
something other than a pure load/store (e.g. it may be an arithmetic
operation with a memory operand). This helps AsmPrinter determine when
to print a spill/reload comment.
This is only a hint since we may not be able to figure this out in all
cases. As such, it should not be relied upon for correctness.
Implement for X86. Return false by default for other architectures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87026
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 20:53:56 +0000 (20:53 +0000)]
Attempt to unbreak LLVM build, David G. please check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87025
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 20:53:43 +0000 (20:53 +0000)]
Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87024
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 12 Nov 2009 20:51:53 +0000 (20:51 +0000)]
If there's more than one function operand to a call instruction, be conservative
and don't assume that the call doesn't throw. It would be nice if there were a
way to determine which is the callee and which is a parameter. In practice, the
architecture we care about normally only have one operand for a call instruction
(x86 and arm).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87023
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 20:49:22 +0000 (20:49 +0000)]
Add a bool flag to StackObjects telling whether they reference spill
slots. The AsmPrinter will use this information to determine whether to
print a spill/reload comment.
Remove default argument values. It's too easy to pass a wrong argument
value when multiple arguments have default values. Make everything
explicit to trap bugs early.
Update all targets to adhere to the new interfaces..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87022
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Nov 2009 20:36:59 +0000 (20:36 +0000)]
Add compare_lower and equals_lower methods to StringRef. Switch all users of
StringsEqualNoCase (from StringExtras.h) to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87020
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 20:25:07 +0000 (20:25 +0000)]
Make FixedStackPseudoSourceValue a first-class PseudoSourceValue by
making it visible to clients and adding LLVM-style cast capability.
This will be used by AsmPrinter to determine when to emit spill comments
for an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87019
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 20:21:09 +0000 (20:21 +0000)]
Add AsmPrinter comment flags to machine instructions so that AsmPrinter
can emit extra information in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87018
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 12 Nov 2009 20:13:34 +0000 (20:13 +0000)]
Add comment flags so AsmPrinter can output additional information when
emitting comments. These flags carry semantic information not otherwise
easily derivable from the IR text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87016
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Thu, 12 Nov 2009 19:08:21 +0000 (19:08 +0000)]
Rename registers to break output dependencies in addition to anti-dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87015
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 12 Nov 2009 19:02:56 +0000 (19:02 +0000)]
"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87014
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Nov 2009 18:36:19 +0000 (18:36 +0000)]
Mark DBG_LABEL, EH_LABEL, and GC_LABEL as not-duplicable, since
they really are not duplicable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87009
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Nov 2009 17:59:45 +0000 (17:59 +0000)]
Silence a warning on targets with unsigned chars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87002
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 12 Nov 2009 17:25:07 +0000 (17:25 +0000)]
Update TB[BH] layout optimization. Add support for moving the target block
to directly follow the jump table. Move the layout changes to prior to any
constant island handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86999
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 12 Nov 2009 17:19:09 +0000 (17:19 +0000)]
Clean up testcase a bit. Simplify case blocks and adjust switch instruction to not take an undefined value as input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86997
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 12 Nov 2009 15:10:33 +0000 (15:10 +0000)]
fix crash in my previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86987
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 12 Nov 2009 14:53:53 +0000 (14:53 +0000)]
implement shl, ashr, and lshr methods. shl is not fully implemented as it is quite tricky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86986
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Nov 2009 12:35:27 +0000 (12:35 +0000)]
Fix typo in run line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86984
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 12 Nov 2009 09:44:17 +0000 (09:44 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86980
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Nov 2009 07:56:08 +0000 (07:56 +0000)]
implement a nice little efficiency hack in the inliner. Since we're now
running IPSCCP early, and we run functionattrs interlaced with the inliner,
we often (particularly for small or noop functions) completely propagate
all of the information about a call to its call site in IPSSCP (making a call
dead) and functionattrs is smart enough to realize that the function is
readonly (because it is interlaced with inliner).
To improve compile time and make the inliner threshold more accurate, realize
that we don't have to inline dead readonly function calls. Instead, just
delete the call. This happens all the time for C++ codes, here are some
counters from opt/llvm-ld counting the number of times calls were deleted vs
inlined on various apps:
Tramp3d opt:
5033 inline - Number of call sites deleted, not inlined
24596 inline - Number of functions inlined
llvm-ld:
667 inline - Number of functions deleted because all callers found
699 inline - Number of functions inlined
483.xalancbmk opt:
8096 inline - Number of call sites deleted, not inlined
62528 inline - Number of functions inlined
llvm-ld:
217 inline - Number of allocas merged together
2158 inline - Number of functions inlined
471.omnetpp:
331 inline - Number of call sites deleted, not inlined
8981 inline - Number of functions inlined
llvm-ld:
171 inline - Number of functions deleted because all callers found
629 inline - Number of functions inlined
Deleting a call is much faster than inlining it, and is insensitive to the
size of the callee. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86975
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Nov 2009 07:49:10 +0000 (07:49 +0000)]
RegScavenger::enterBasicBlock should always reset register state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86972
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Nov 2009 07:35:05 +0000 (07:35 +0000)]
- Teach LSR to avoid changing cmp iv stride if it will create an immediate that
cannot be folded into target cmp instruction.
- Avoid a phase ordering issue where early cmp optimization would prevent the
later count-to-zero optimization.
- Add missing checks which could cause LSR to reuse stride that does not have
users.
- Fix a bug in count-to-zero optimization code which failed to find the pre-inc
iv's phi node.
- Remove, tighten, loosen some incorrect checks disable valid transformations.
- Quite a bit of code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86969
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Nov 2009 07:16:34 +0000 (07:16 +0000)]
Use table to separate opcode from operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86965
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Nov 2009 07:13:11 +0000 (07:13 +0000)]
isLegalICmpImmediate should take a signed integer; code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86964
91177308-0d34-0410-b5e6-
96231b3b80d8