Chris Lattner
a9b1ea03e9
add a new MachineJumpTableInfo::getJTISymbol method,
...
use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr
llvm-svn: 94523
2010-01-26 05:58:28 +00:00
Chris Lattner
3b2bf7ab66
stub out a new target hook, need some refactoring before I can
...
implement it.
llvm-svn: 94521
2010-01-26 05:30:30 +00:00
Chris Lattner
b020478ce5
simplify asmprinter: only emit .set directives when entries have
...
EK_LabelDifference32 kind and the target has .set support. Simplify
X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers.
llvm-svn: 94518
2010-01-26 05:15:20 +00:00
Chris Lattner
945bbf606f
rename printPICJumpTableEntry -> EmitJumpTableEntry,
...
make it private and non-virtual. It handles the non-pic
case too, so just use it, simplifying EmitJumpTableInfo.
llvm-svn: 94517
2010-01-26 05:10:10 +00:00
Chris Lattner
7d88592ba1
implement X86 @GOTOFF jump table entries with the new EK_Custom32
...
jump table entry kind, instead of overloading
AsmPrinter::printPICJumpTableEntry.
This has a pretty horrible and inefficient FIXME around how @GOTOFF
is currently smashed into the mcsymbol name, but otherwise this is
much cleaner.
llvm-svn: 94516
2010-01-26 05:02:42 +00:00
Chris Lattner
b4a5d00176
add a new MachineBasicBlock::getSymbol method, replacing
...
the AsmPrinter::GetMBBSymbol.
llvm-svn: 94515
2010-01-26 04:55:51 +00:00
Lang Hames
91856859d6
New PBQP solver.
...
* Fixed a reduction bug which occasionally led to infinite-cost (invalid)
register allocation solutions despite the existence finite-cost solutions.
* Significantly reduced memory usage (>50% reduction).
* Simplified a lot of the solver code.
llvm-svn: 94514
2010-01-26 04:49:58 +00:00
Dan Gohman
5e06a05a16
Fix the the ceiling-division used in computing the MaxBECount so that it doesn't
...
have trouble with an intermediate add overflowing. Also, be more conservative
about the case where the induction variable in an SLT loop exit can step past
the RHS of the SLT and overflow in a single step.
Make getSignedRange more aggressive, to recover for some common cases which
the above fixes pessimized.
This addresses rdar://7561161.
llvm-svn: 94512
2010-01-26 04:40:18 +00:00
Chris Lattner
416de57b74
don't bother setting the AsmPrinter::MF ivar, now that
...
AsmPrinter::SetupMachineFunction sets it. Note that systemz
and msp430 didn't. Yay for reduced inconsistency! :)
llvm-svn: 94510
2010-01-26 04:38:11 +00:00
Chris Lattner
d25ec1b3bd
make MachineFunction keep track of its ID and make
...
MachineFunctionAnalysis dole them out, instead of having
AsmPrinter do both. Have the AsmPrinter::SetupMachineFunction
method set the 'AsmPrinter::MF' variable.
llvm-svn: 94509
2010-01-26 04:35:26 +00:00
Chris Lattner
41f661d2c2
this hook should be const.
...
llvm-svn: 94508
2010-01-26 04:19:00 +00:00
Dan Gohman
0c02f09fba
Add a comment about a missed opportunity.
...
llvm-svn: 94507
2010-01-26 04:13:15 +00:00
Dan Gohman
2d9a3eb391
Print empty and full sets specially.
...
llvm-svn: 94506
2010-01-26 04:12:55 +00:00
Chris Lattner
5ee5b62838
Add support for target-specific 32-bit custom-lowered
...
jump table entries.
llvm-svn: 94505
2010-01-26 04:05:28 +00:00
Daniel Dunbar
ea2288006f
Unbreak MSVC/CMake build.
...
llvm-svn: 94502
2010-01-26 03:56:22 +00:00
Chris Lattner
643adc5090
make jit jump table emission be based on the EntryKind instead of magic variables.
...
JITInfo::getPICJumpTableEntry can probably be removed now, but I don't plan to do
this.
llvm-svn: 94501
2010-01-26 03:47:15 +00:00
Chris Lattner
d0c077cef7
switch jump table entry emission to be based on EntryKind
...
instead of magic variables.
llvm-svn: 94500
2010-01-26 03:43:22 +00:00
Victor Hernandez
f12e8a120f
In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store.
...
llvm-svn: 94493
2010-01-26 02:42:15 +00:00
Victor Hernandez
ab3ebb1a4a
Add MDNode::getIfExists(), an efficient way to determine if a value is used by metadata (since metadata does not appear in a value's use list)
...
llvm-svn: 94492
2010-01-26 02:36:35 +00:00
Victor Hernandez
648015f3a6
Assert when debug intrinsic insert functions are passed empty arguments
...
llvm-svn: 94491
2010-01-26 02:07:38 +00:00
Evan Cheng
548d00d77c
Implement cond ? -1 : 0 with sbb.
...
llvm-svn: 94490
2010-01-26 02:00:44 +00:00
Dale Johannesen
c9b61e3433
Accept immediate as value of a dbg_value.
...
llvm-svn: 94489
2010-01-26 01:54:26 +00:00
Jeffrey Yasskin
c5e7f3d7f1
Re-enable unit tests disabled in r94164 by telling GTest about the
...
lack of RTTI.
llvm-svn: 94484
2010-01-26 01:26:46 +00:00
Sean Callanan
7cbd38ee14
Added the implementation of the Intel-specific
...
TargetAsmLexer.
llvm-svn: 94482
2010-01-26 01:00:10 +00:00
Dale Johannesen
d75f9dc3ff
Generate DEBUG_VALUE comments on x86. The (limited)
...
dbg.declare's we currently generate go through both
register allocators without perturbing the results.
llvm-svn: 94480
2010-01-26 00:09:58 +00:00
Sean Callanan
285d34cedd
Added the TargetAsmLexer implementation for AT&T syntax.
...
llvm-svn: 94479
2010-01-26 00:08:25 +00:00
Dale Johannesen
e26033402e
use findDebugLoc in more places.
...
llvm-svn: 94477
2010-01-26 00:03:12 +00:00
Jim Grosbach
122b05d47f
Minor jump table cleanup.
...
llvm-svn: 94475
2010-01-25 23:50:13 +00:00
Chris Lattner
9e24c71bd4
in 32-bit pic mode for targets with a GOT, x86 emits jump table
...
entries with @GOTOFF whih is EK_GPRel32BlockAddress.
llvm-svn: 94474
2010-01-25 23:38:14 +00:00
Chris Lattner
aa82645068
fix quoting problem jim noticed!
...
llvm-svn: 94472
2010-01-25 23:28:03 +00:00
Chris Lattner
efdc572e44
Rearrange handling of jump tables. Highlights:
...
1. MachineJumpTableInfo is now created lazily for a function the first time
it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the
TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
throughout the compiler that "knows" that jump table entries are always
32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
their kind, instead of at machinefunction creation time.
Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.
llvm-svn: 94470
2010-01-25 23:26:13 +00:00
Chris Lattner
e3f214b438
prep work to support a future where getJumpTableInfo will return
...
a null pointer for functions with no jump tables. No functionality
change.
llvm-svn: 94469
2010-01-25 23:22:00 +00:00
Chris Lattner
00ba9a5343
add a method to get the alignment of an integer type even
...
when we don't have one laying around. Useful if you don't
have an llvmcontext handy.
llvm-svn: 94468
2010-01-25 23:18:11 +00:00
Johnny Chen
9ff21f3121
Make it SP, LR, PC for GPR Register Class instead of LR, SP, PC.
...
llvm-svn: 94465
2010-01-25 22:54:29 +00:00
Chris Lattner
1e05dd3446
eliminate redundant argument to EmitJumpTableInfo
...
llvm-svn: 94464
2010-01-25 22:41:33 +00:00
Johnny Chen
40f1246038
Implemented ARMInstPrinter::printThumbS4ImmOperand().
...
llvm-svn: 94457
2010-01-25 22:13:10 +00:00
Sean Callanan
4dbe558a10
Implemented the dialect decision logic for the X86
...
TargetAsmLexer. Dialect-specific lexing code will
be placed in the functions LexTokenATT() and
LexTokenIntel().
llvm-svn: 94456
2010-01-25 21:59:20 +00:00
Johnny Chen
4facdb7d00
Fixed the order of GPR RegisterClass regs to be: ..., R10, R11, R12, ...
...
llvm-svn: 94455
2010-01-25 21:56:35 +00:00
Dan Gohman
18bbc20ac8
Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case
...
of a forward-reference, which doesn't use an "abbrev" encoding.
llvm-svn: 94454
2010-01-25 21:55:39 +00:00
Chris Lattner
3559d9a38a
mcstreamerize gprel32 emission.
...
llvm-svn: 94452
2010-01-25 21:28:50 +00:00
Bob Wilson
e3d00b2e56
Remove check for an impossible condition: the condition of the while loop has
...
already checked that TmpBB->getSinglePredecessor() is non-null.
llvm-svn: 94451
2010-01-25 21:28:05 +00:00
Chris Lattner
151c0e8669
mcize the non-gprel cases of AsmPrinter::printPICJumpTableEntry
...
llvm-svn: 94450
2010-01-25 21:22:22 +00:00
Chris Lattner
27d1a6fed5
handle the _set_ symbol with an MCSymbol.
...
llvm-svn: 94449
2010-01-25 21:17:10 +00:00
Chris Lattner
ac1144c110
rename MAI::PICJumpTableDirective to MAI::GPRel32Directive to
...
make it clear what it is, instead of how it is used.
llvm-svn: 94448
2010-01-25 21:10:10 +00:00
Chris Lattner
ee2163758e
pull the non-pic jump table case out of printPICJumpTableEntry
...
and MCize the non-pic case. Now printPICJumpTableEntry really
is just about printing PIC entries.
llvm-svn: 94446
2010-01-25 21:01:58 +00:00
Chris Lattner
fafb52a75a
remove JumpTableDirective, it is always null.
...
llvm-svn: 94445
2010-01-25 20:52:54 +00:00
Chris Lattner
b05aa7f639
no need to implement these.
...
llvm-svn: 94443
2010-01-25 20:37:36 +00:00
Chris Lattner
1e1d7ad2f8
mcize jump table symbol manipulation.
...
llvm-svn: 94441
2010-01-25 19:51:38 +00:00
Chris Lattner
1cd2ba1c3a
sink an arm specific method out of asmprinter into the ARMAsmPrinter and
...
rename it to avoid shadowing.
llvm-svn: 94440
2010-01-25 19:39:52 +00:00
Chris Lattner
fc056d77e4
remove dead code: the x86 target never sets usesGlobalOffsetTable,
...
even on x86-32/elf which uses a GOT.
llvm-svn: 94439
2010-01-25 19:23:04 +00:00