Daniel Dunbar
241d01b590
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!
llvm-svn: 88768
2009-11-14 10:09:12 +00:00
Nick Lewycky
7935bcb0fe
Remove LLVMContext from reassociate. It was threaded through every function but
...
ultimately never used.
llvm-svn: 88763
2009-11-14 07:25:54 +00:00
Sanjiv Gupta
d03742a122
revert 88761 as it fails builds.
...
llvm-svn: 88762
2009-11-14 07:22:25 +00:00
Sanjiv Gupta
8f9c22646b
Fix debug info crashes for PIC16.
...
llvm-svn: 88761
2009-11-14 06:19:49 +00:00
Nick Lewycky
c53e2ecf02
Teach BasicAA that a constant expression can't alias memory provably not
...
allocated until runtime (such as an alloca). Patch by Hans Wennborg!
llvm-svn: 88760
2009-11-14 06:15:14 +00:00
Evan Cheng
16797a1f55
Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
...
llvm-svn: 88753
2009-11-14 03:42:17 +00:00
Evan Cheng
6ad7da96fe
- 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.
llvm-svn: 88745
2009-11-14 02:55:43 +00:00
Dan Gohman
81132465d3
Add an option for running GVN with redundant load processing disabled.
...
llvm-svn: 88742
2009-11-14 02:27:51 +00:00
Evan Cheng
e3b312fec9
Add radar number.
...
llvm-svn: 88739
2009-11-14 02:11:32 +00:00
Evan Cheng
d2c10508cd
Fix PR5412: Fix an inverted check and another missing sub-register check.
...
llvm-svn: 88738
2009-11-14 02:09:09 +00:00
Dan Gohman
a627e26d39
Enable the tail call optimization when the caller returns undef.
...
llvm-svn: 88737
2009-11-14 02:06:30 +00:00
Evan Cheng
66401c90da
When expanding t2STRDi8 r, r to two stores, add kill markers correctly.
...
llvm-svn: 88734
2009-11-14 01:50:00 +00:00
Jakob Stoklund Olesen
24b027401e
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.
llvm-svn: 88728
2009-11-14 00:38:13 +00:00
Jakob Stoklund Olesen
15ca009ee7
Update MachineDominator information
...
llvm-svn: 88727
2009-11-14 00:38:06 +00:00
Lang Hames
6b7233afc6
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.
llvm-svn: 88725
2009-11-14 00:02:51 +00:00
Evan Cheng
78fa302e7d
Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.
...
llvm-svn: 88719
2009-11-13 23:16:41 +00:00
Eric Christopher
96b26acd0f
Remove extraneous commit.
...
llvm-svn: 88716
2009-11-13 23:08:47 +00:00
Eric Christopher
0cabd30b22
Print out something, even if it's non-parseable later when we've
...
got ghost linkage. It's better than aborting.
llvm-svn: 88715
2009-11-13 23:00:14 +00:00
Dan Gohman
6e99014947
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.
llvm-svn: 88711
2009-11-13 22:24:13 +00:00
Bill Wendling
6787318557
Disable the JITTest.NoStubs test for Darwin PPC. It apparently doesn't implement
...
emitFunctionStubAtAddr.
llvm-svn: 88708
2009-11-13 21:58:54 +00:00
Jakob Stoklund Olesen
ad205d6102
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.
llvm-svn: 88707
2009-11-13 21:56:15 +00:00
Jakob Stoklund Olesen
27440e71fc
Add MachineFunction::verify() to call the machine code verifier directly.
...
llvm-svn: 88706
2009-11-13 21:56:09 +00:00
Jakob Stoklund Olesen
ff0302489b
The instruction pointer %RIP is a reserved register on x86_64.
...
llvm-svn: 88705
2009-11-13 21:56:01 +00:00
Jakob Stoklund Olesen
1ecc8b2de1
Fix polarity of a CFG check in machine verifier.
...
llvm-svn: 88704
2009-11-13 21:55:54 +00:00
Dan Gohman
7474546e4d
Use .data() instead of .c_str() when nul-termination is not needed.
...
llvm-svn: 88703
2009-11-13 21:55:31 +00:00
Devang Patel
452c1646c6
Do not use value handle to wrap MDNode in DIDescriptor.
...
llvm-svn: 88700
2009-11-13 21:45:04 +00:00
David Greene
659c1a9d78
Move DebugInfo checks into EmitComments and remove them from
...
target-specific AsmPrinters. Not all comments need DebugInfo.
Re-enable the line numbers comment test.
llvm-svn: 88697
2009-11-13 21:34:57 +00:00
Dan Gohman
225fa59cac
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.
llvm-svn: 88692
2009-11-13 21:02:15 +00:00
Evan Cheng
d190b8216f
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.
llvm-svn: 88690
2009-11-13 20:36:40 +00:00
David Goodwin
b9fe5d5d02
Allow target to specify regclass for which antideps will only be broken along the critical path.
...
llvm-svn: 88682
2009-11-13 19:52:48 +00:00
Bruno Cardoso Lopes
a03b5b44fc
Support fp64 immediate zero, this fixes only part of PR5445
...
because the testcase is triggering one more bug.
llvm-svn: 88674
2009-11-13 18:49:59 +00:00
Dan Gohman
f80dc08059
Don't let a noalias difference disrupt the tailcall optimization.
...
llvm-svn: 88672
2009-11-13 18:49:38 +00:00
David Greene
a32c214b23
Remove duplicate APIs and state WRT spill objects.
...
llvm-svn: 87106
2009-11-13 14:42:06 +00:00
Rafael Espindola
ff2c72b858
Distinguish "a," from "a". The first one splits into "a" + "" and the second one into
...
"a" + 0.
llvm-svn: 87084
2009-11-13 04:55:09 +00:00
Devang Patel
76a06074eb
Revert r87059 for now. It is failing clang tests.
...
llvm-svn: 87070
2009-11-13 02:27:33 +00:00
Devang Patel
97f99fa554
Ignore nameless variables.
...
llvm-svn: 87069
2009-11-13 02:25:26 +00:00
Rafael Espindola
7c6854995d
Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
...
llvm-svn: 87068
2009-11-13 02:18:25 +00:00
Dale Johannesen
5f4eecf961
Adjust isConstantSplat to allow for big-endian targets.
...
PPC is such a target; make it work.
llvm-svn: 87060
2009-11-13 01:45:18 +00:00
Victor Hernandez
41e7648e09
Remove unnecessary llvm.dbg.declare bitcast
...
llvm-svn: 87059
2009-11-13 01:44:55 +00:00
Rafael Espindola
d554e44092
Add a new split method to StringRef that puts the substrings in a vector.
...
llvm-svn: 87058
2009-11-13 01:24:40 +00:00
Jim Grosbach
46a524c3e8
Block renumbering
...
llvm-svn: 87056
2009-11-13 01:19:24 +00:00
Jim Grosbach
969910b3e8
use lower case for readability
...
llvm-svn: 87054
2009-11-13 01:17:22 +00:00
Daniel Dunbar
3f75f5ddcb
Update test.
...
llvm-svn: 87049
2009-11-13 01:01:58 +00:00
David Greene
2f4c37425b
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.
llvm-svn: 87047
2009-11-13 00:29:53 +00:00
Owen Anderson
e96b2111b1
Re-enable this code, since redundant PHIs are now being better nuked.
...
llvm-svn: 87042
2009-11-12 23:22:41 +00:00
Bill Wendling
c781d7a072
Simplify code a bit
...
llvm-svn: 87040
2009-11-12 23:13:08 +00:00
Bill Wendling
e412064c4c
Refactor code that checks if it's a call to a "nounwind" function.
...
llvm-svn: 87036
2009-11-12 21:59:20 +00:00
Chris Lattner
5c89f4b4ef
use isInstructionTriviallyDead, as pointed out by Duncan
...
llvm-svn: 87035
2009-11-12 21:58:18 +00:00
David Greene
033d65581d
Do some cleanups suggested by Chris.
...
llvm-svn: 87034
2009-11-12 21:49:55 +00:00
Daniel Dunbar
5fb4e7553c
StringRef(const char*) should not be used to turn null pointers into empty
...
strings.
llvm-svn: 87031
2009-11-12 21:26:11 +00:00