Chris Lattner
ee2b6b1cc5
emit jump table an alias ".set" directives through MCStreamer as
...
assignments.
.set x, a-b
is the same as:
x = a-b
llvm-svn: 94596
2010-01-26 21:53:08 +00:00
Chris Lattner
c2717878e8
fix CastInst::castIsValid to reject aggregate types, fixing PR6153:
...
llvm-as: t.ll:1:25: error: invalid cast opcode for cast from '[4 x i8]' to '[1 x i32]'
@x = constant [1 x i32] bitcast ([4 x i8] c"abcd" to [1 x i32])
^
llvm-svn: 94595
2010-01-26 21:51:43 +00:00
Devang Patel
4563d073d3
Use AssertingVH, just to be paranoid.
...
llvm-svn: 94593
2010-01-26 21:39:14 +00:00
Jakob Stoklund Olesen
1218f1331f
Revert test polarity to match comment and desired outcome. Remove undeserved bonus.
...
A GEP with all constant indices is already considered free by
analyzeBasicBlock(), so don't give it an extra bonus in
CountCodeReductionForAlloca().
This patch should remove a small positive bias toward inlining functions with
variable-index GEPs, and remove a smaller negative bias from functions with
all-constant index GEPs.
llvm-svn: 94591
2010-01-26 21:31:35 +00:00
Jakob Stoklund Olesen
f4b32e1185
Remove dead code.
...
Functions containing indirectbr are marked NeverInline by analyzeBasicBlock(),
so there is no point in giving indirectbr special treatment in
CountCodeReductionForConstant. It is never called.
No functional change intended.
llvm-svn: 94590
2010-01-26 21:31:30 +00:00
Jakob Stoklund Olesen
509e8f1ec8
Skip calculation of ArgumentWeights if it will never be used.
...
Save a few bytes by allocating the correct size vector.
No functional change intended.
llvm-svn: 94589
2010-01-26 21:31:24 +00:00
Devang Patel
84b21559f8
Emit DW_AT_containing_type attribute for a class if containing type is known.
...
llvm-svn: 94587
2010-01-26 21:16:06 +00:00
Devang Patel
9e6549db1d
Add extra element to composite type. This new element will be used to record c++ class that holds current class's vtable.
...
llvm-svn: 94586
2010-01-26 21:14:59 +00:00
Chris Lattner
325a36c358
Eliminate SetDirective, and replace it with HasSetDirective.
...
Default HasSetDirective to true, since most targets have it.
The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16. All of these except pic16 are normal ELF targets, so
they almost certainly have it.
llvm-svn: 94585
2010-01-26 20:40:54 +00:00
Evan Cheng
54f23f1179
Delete dead code.
...
llvm-svn: 94583
2010-01-26 20:36:21 +00:00
Rafael Espindola
f46baf3304
Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.
...
Original patch by Sandeep Patel and updated by me.
llvm-svn: 94582
2010-01-26 20:21:43 +00:00
Chris Lattner
044439c9bc
eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
...
that has it.
llvm-svn: 94581
2010-01-26 20:20:43 +00:00
Chris Lattner
9f98fa6707
don't set to the default value.
...
llvm-svn: 94580
2010-01-26 20:17:34 +00:00
Dan Gohman
4b3987001a
Make the unsigned-range code more consistent with the signed-range code,
...
and clean up some loose ends.
llvm-svn: 94572
2010-01-26 19:19:05 +00:00
Evan Cheng
b308493fc0
Code refactoring, no functionality change.
...
llvm-svn: 94570
2010-01-26 19:04:47 +00:00
Victor Hernandez
3a9845ecf7
Switch AllocaDbgDeclares to SmallVector and don't leak DIFactory
...
llvm-svn: 94567
2010-01-26 18:57:53 +00:00
Dan Gohman
fd52a58a99
Fix a typo in a comment that Duncan noticed.
...
llvm-svn: 94562
2010-01-26 18:32:54 +00:00
Dan Gohman
124de89a93
Remove SIL, DIL, and BPL from the GR8_NOREX allocation order also.
...
llvm-svn: 94560
2010-01-26 18:30:24 +00:00
Dan Gohman
9fe369e610
SIL, DIL, BPL, and SPL require a REX prefix.
...
llvm-svn: 94558
2010-01-26 18:14:22 +00:00
Dan Gohman
783616ec9a
Rename ItCount to BECount, since it holds a backedge-taken count rather
...
than an iteration count.
llvm-svn: 94549
2010-01-26 16:46:18 +00:00
Dan Gohman
332216f73c
Fix ICmpInst::makeConstantRange to use ConstantRange's API properly
...
in the case of empty and full ranges.
llvm-svn: 94548
2010-01-26 16:04:20 +00:00
Dan Gohman
47ec8cddb7
Fix a typo that several people pointed out. Also, address the case of
...
wrapping that Duncan pointed out.
llvm-svn: 94547
2010-01-26 15:56:18 +00:00
Mikhail Glushenkov
f74d495859
Better error message.
...
llvm-svn: 94544
2010-01-26 14:55:16 +00:00
Chris Lattner
967a37fb26
eliminate the TargetLowering::UsesGlobalOffsetTable bool, which is
...
subsumed by TargetLowering::getJumpTableEncoding(). Change uses of
it to be more specific.
llvm-svn: 94529
2010-01-26 06:53:37 +00:00
Chris Lattner
b711ded671
Now that printPICJumpTableSetLabel is not overloaded,
...
inline it into its only caller, allowing us to simplify it
and hoist bits out of the loop.
llvm-svn: 94528
2010-01-26 06:42:44 +00:00
Chris Lattner
d87c50833a
Move getJTISymbol from MachineJumpTableInfo to MachineFunction,
...
which is more convenient, and change getPICJumpTableRelocBaseExpr
to take a MachineFunction to match.
Next, move the X86 code that create a PICBase symbol to
X86TargetLowering::getPICBaseSymbol from
X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific
library. This eliminates a 'gross hack', and allows us to
implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now
calls it.
This in turn allows us to eliminate the
X86AsmPrinter::printPICJumpTableSetLabel method, which was the
only overload of printPICJumpTableSetLabel.
llvm-svn: 94526
2010-01-26 06:28:43 +00:00
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
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
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
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
Chris Lattner
5f919913e8
wirte up .file and .file to the mc asmparser.
...
llvm-svn: 94438
2010-01-25 19:02:58 +00:00
Chris Lattner
20d89c382c
mcstreamerize .file and .file. This also fixes an issue where the
...
normal form of .file would fail if the filename had a weird character
in it.
llvm-svn: 94437
2010-01-25 18:58:59 +00:00
Chris Lattner
4746185ef2
emit ELF .type directives through MCStreamer instead of doing it textually.
...
llvm-svn: 94436
2010-01-25 18:33:40 +00:00
Chris Lattner
7a5c8c15bd
add symbol attribute support for the ELF .type directive.
...
llvm-svn: 94435
2010-01-25 18:30:45 +00:00
Bob Wilson
1882fba746
Change Value::getUnderlyingObject to have the MaxLookup value specified as a
...
parameter with a default value, instead of just hardcoding it in the
implementation. The limit of MaxLookup = 6 was introduced in r69151 to fix
a performance problem with O(n^2) behavior in instcombine, but the scalarrepl
pass is relying on getUnderlyingObject to go all the way back to an AllocaInst.
Making the limit part of the method signature makes it clear that by default
the result is limited and should help avoid similar problems in the future.
This fixes pr6126.
llvm-svn: 94433
2010-01-25 18:26:54 +00:00
Victor Hernandez
253c09eb8f
Revert r94260 until findDbgDeclare() is made more efficient
...
llvm-svn: 94432
2010-01-25 17:52:13 +00:00
Chris Lattner
30a253067e
add a comment
...
llvm-svn: 94417
2010-01-25 07:53:05 +00:00
Chris Lattner
9834b7f300
emit the .size directive for global variables on ELF through
...
mcstreamer.
llvm-svn: 94416
2010-01-25 07:52:13 +00:00
Chris Lattner
474395e815
all supported target now have aligned common support.
...
llvm-svn: 94413
2010-01-25 07:29:13 +00:00
Chris Lattner
355085f393
Remove support for i386 tiger tools for aligned common symbols.
...
Previously we would just silently miscompile code that used aligned
common's, now at least you'll get a build error. tiger-ppc already
triggered the build error because it didn't have a version of this
logic.
llvm-svn: 94412
2010-01-25 07:26:17 +00:00
Chris Lattner
3db729e661
don't set value to its default.
...
llvm-svn: 94411
2010-01-25 07:23:14 +00:00
Chris Lattner
0b42d3ef45
coff targets support alignment on .comm
...
llvm-svn: 94410
2010-01-25 07:20:44 +00:00
Jim Grosbach
4f713bf0fb
ARM does accept the .comm directive alignment.
...
llvm-svn: 94408
2010-01-25 04:59:07 +00:00
Rafael Espindola
82a8b3efd4
Fix PR6134.
...
We are not emitting alignments on Darwin for "bar". Not sure what is the
correct way to do it.
llvm-svn: 94400
2010-01-25 02:27:39 +00:00
Chris Lattner
e04db98cdd
linux/ppc does use alignment in bytes, not pow-2. This fixes PR6129.
...
It looks like linux/arm and linux/mips have the same setting, which
are probably wrong. Someone who cares about ARM and MIPS should
investigate with the testcase in PR6129.
llvm-svn: 94381
2010-01-24 20:54:45 +00:00
Chris Lattner
bf8495a08e
don't reset the default.
...
llvm-svn: 94380
2010-01-24 20:53:12 +00:00
Chris Lattner
5a57121631
make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
...
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Chris Lattner
397d34f06b
mark some libraries that currently require RTTI.
...
llvm-svn: 94377
2010-01-24 20:22:08 +00:00
Chris Lattner
82318209c4
reassociate should do this.
...
llvm-svn: 94374
2010-01-24 20:17:09 +00:00
Chris Lattner
e328ab9a00
add a note.
...
llvm-svn: 94373
2010-01-24 20:01:41 +00:00
Chris Lattner
0dde21dba4
fix some issues where we weren't emitting enough newlines.
...
llvm-svn: 94370
2010-01-24 19:01:06 +00:00
Chris Lattner
c0ac5c1d3b
when emitting DIEs, emit the comment on the same line as the directive.
...
This fixes FrontendObjC/2009-11-30-Objc-ID.m
llvm-svn: 94369
2010-01-24 18:54:17 +00:00
Chris Lattner
d9f55b7c3d
move PR5945 here.
...
llvm-svn: 94350
2010-01-24 02:27:03 +00:00
Chris Lattner
5d31547fec
fix a parsing problem on instructions like:
...
movw $8, (_cost_table_-L97$pb)+66(%eax)
After the parens, we could still have a binop.
llvm-svn: 94345
2010-01-24 01:07:33 +00:00
Mon P Wang
d4d1cbb72b
It seems better to scalarize vectors of size 1 instead of widening them.
...
Add support to widen SETCC.
llvm-svn: 94342
2010-01-24 00:24:43 +00:00
Chris Lattner
91fafbd4e8
change the canonical form of "cond ? -1 : 0" to be
...
"sext cond" instead of a select. This simplifies some instcombine
code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows
us to generate better code for a testcase on ppc.
llvm-svn: 94339
2010-01-24 00:09:49 +00:00
Mon P Wang
871ea08e40
Improved widening loads by adding support for wider loads if
...
the alignment allows. Fixed a bug where we didn't use a
vector load/store for PR5626.
llvm-svn: 94338
2010-01-24 00:05:03 +00:00
Chris Lattner
b9e618553f
fix a potential overflow issue Eli pointed out.
...
llvm-svn: 94336
2010-01-23 23:31:46 +00:00
Nick Lewycky
f9a681fb61
Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.
...
llvm-svn: 94331
2010-01-23 20:32:12 +00:00
Chris Lattner
b444bc0234
third bug from PR6119: the xor dupe extension allows
...
for arbitrary terminators in predecessors, don't assume
it is a conditional or uncond branch. The testcase shows
an example where they can happen with switches.
llvm-svn: 94323
2010-01-23 19:21:31 +00:00
Nick Lewycky
8bbb754c7c
Teach DAE that even though it can't modify the function signature of an
...
externally visible function, it can still find all callers of it and replace
the parameters to a dead argument with undef.
llvm-svn: 94322
2010-01-23 19:19:34 +00:00
Chris Lattner
7130788ea2
add an early out to ProcessBranchOnXOR to speed it up,
...
handle the case when we can infer an input to the xor
from all inputs that agree, instead of going into an
infinite loop. Another part of PR6199
llvm-svn: 94321
2010-01-23 19:16:25 +00:00
Chris Lattner
e4391a1adb
fix a crash in jump threading, PR6119
...
llvm-svn: 94319
2010-01-23 18:56:07 +00:00
Chris Lattner
8909d5aca5
implement a simple instcombine xform that has been in the
...
readme forever.
llvm-svn: 94318
2010-01-23 18:49:30 +00:00
Chris Lattner
744a23610a
add a note
...
llvm-svn: 94317
2010-01-23 18:42:37 +00:00
Chris Lattner
fdc6162f82
add some notes, making posix-memalign be nocapture would be an easy improvement.
...
llvm-svn: 94312
2010-01-23 17:59:23 +00:00
Bill Wendling
7449bb010b
Remove the '-disable-scheduling' flag and replace it with the 'source' option of
...
the '-pre-RA-sched' flag. It actually makes more sense to do it this way. Also,
keep track of the SDNode ordering by default. Eventually, we would like to make
this ordering a way to break a "tie" in the scheduler. However, doing that now
breaks the "CodeGen/X86/abi-isel.ll" test for 32-bit Linux.
llvm-svn: 94308
2010-01-23 10:26:57 +00:00
Benjamin Kramer
252f9b6a26
Respect operator precedence (and silence a gcc 4.3 warning).
...
llvm-svn: 94304
2010-01-23 09:54:23 +00:00
Chris Lattner
617e6fb889
mcize lcomm, simplify .comm, extend both to support 64-bit sizes.
...
llvm-svn: 94299
2010-01-23 07:47:02 +00:00
Chris Lattner
7e1fa376cc
resolve a fixme: the "nonexecutable stack directive" is actually
...
a .section. Switch to it with SwitchSection.
However, I think that this directive should be safe on any ELF target.
If so, we should hoist it up out of the X86 and SystemZ targets.
llvm-svn: 94298
2010-01-23 07:21:06 +00:00
Chris Lattner
7fe6265555
remove a dead call.
...
llvm-svn: 94297
2010-01-23 07:17:54 +00:00
Chris Lattner
4db62b81c3
use helpers.
...
llvm-svn: 94296
2010-01-23 07:00:21 +00:00
Chris Lattner
56c318f344
mcize visibility directives.
...
llvm-svn: 94295
2010-01-23 06:53:23 +00:00
Chris Lattner
60edc92e39
move the various directive enums out of the MCStreamer class
...
into a new MCDirectives.h file.
llvm-svn: 94294
2010-01-23 06:39:22 +00:00
Chris Lattner
1b7c00a4f2
Change constantexpr global variable initializers to convert the constants
...
to MCExpr then emit them through MCStreamer with EmitValue. I think all
global variable initializers are now going through mcstreamer.
llvm-svn: 94293
2010-01-23 06:17:14 +00:00
Eric Christopher
e6d6bfcc32
Don't lower splat vector load to relative to the esp if the
...
stack may be misaligned.
Update test accordingly.
Patch by Evan Cheng!
llvm-svn: 94291
2010-01-23 06:02:43 +00:00
Chris Lattner
62d08f5577
mcstreamerize .no_dead_strip and .reference for static ctors/dtors.
...
llvm-svn: 94290
2010-01-23 05:51:36 +00:00
Eric Christopher
bc8f2b1a56
Reapply 94059 while fixing the calling convention setup
...
for strcpy.
llvm-svn: 94287
2010-01-23 05:29:06 +00:00
Chris Lattner
d9cedc9675
remove unneeded directive set.
...
llvm-svn: 94286
2010-01-23 05:28:25 +00:00
Chris Lattner
e41f630fa0
use some helpers instead of duplicating logic.
...
llvm-svn: 94285
2010-01-23 05:26:25 +00:00
Chris Lattner
2ee0376c42
mcize jump table and constant pool entry labels, .local on elf,
...
and some .weak directives.
llvm-svn: 94284
2010-01-23 05:19:23 +00:00
Chris Lattner
20a336f1df
emit .ascii and .asciz through MCStreamer.
...
llvm-svn: 94282
2010-01-23 04:54:10 +00:00
Chris Lattner
7223430983
simplify code a bit.
...
llvm-svn: 94281
2010-01-23 04:42:42 +00:00
Mon P Wang
b7fce13b78
InstCombine should not fold sext/zext of a vector and a bitcast to a scalar to a sext/zext
...
llvm-svn: 94280
2010-01-23 04:35:57 +00:00
Ted Kremenek
e45feb24f8
Update CMake build.
...
llvm-svn: 94278
2010-01-23 04:01:37 +00:00
Chris Lattner
e6801b7c24
remove one form of EmitString, just use EmitBytes instead. We must
...
be careful to add a \0 at the end though, because EmitString didn't
do this.
llvm-svn: 94277
2010-01-23 03:11:46 +00:00
Sean Callanan
d50d17e067
Added the skeleton for the implementation of the X86
...
target-specific AsmLexer, and added the appropriate
registration calls.
llvm-svn: 94275
2010-01-23 02:43:15 +00:00
Sean Callanan
1942b96584
Modified the register matcher function in AsmMatcher to
...
be static. Also made it possible for clients to get it
and no other functions from ...GenAsmMatcher.inc by
defining REGISTERS_ONLY before including GenAsmMatcher.inc.
This sets the stage for target-specific lexers that can
identify registers and return AsmToken::Register as
appropriate.
llvm-svn: 94266
2010-01-23 00:40:33 +00:00
Devang Patel
280d341d36
Avoid using "Type" as the variable name.
...
llvm-svn: 94262
2010-01-23 00:26:28 +00:00
Victor Hernandez
7ce9006ba0
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: 94260
2010-01-23 00:17:34 +00:00
Chris Lattner
e46549ed67
teach MCAsmStreamer::EmitBytes to use .ascii and .asciz
...
llvm-svn: 94259
2010-01-23 00:15:00 +00:00
Victor Hernandez
f61bd354ef
Make sure ValueFn starts off empty
...
llvm-svn: 94256
2010-01-23 00:03:28 +00:00
Evan Cheng
a238930f0b
Enable pre-regalloc scheduling load clustering by default.
...
llvm-svn: 94255
2010-01-22 23:49:45 +00:00
Evan Cheng
1093210d30
Be more conservative with clustering f32 / f64 loads.
...
llvm-svn: 94254
2010-01-22 23:49:11 +00:00
Chris Lattner
f703377447
move "EOL" from asmprinter to dwarfprinter. It should eventually
...
be completely eliminated, but today is not that day.
llvm-svn: 94253
2010-01-22 23:47:11 +00:00
Chris Lattner
22ec298d24
remove uses of EOL.
...
llvm-svn: 94252
2010-01-22 23:43:14 +00:00
Chris Lattner
be728e94f1
add a new EmitCFAByte method and use it.
...
llvm-svn: 94251
2010-01-22 23:40:08 +00:00
Chris Lattner
de2a14c724
move uleb printing from asmprinter to dwarfprinter, mcize,
...
cleanup and eliminate a bunch more uses of "EOL".
llvm-svn: 94250
2010-01-22 23:18:42 +00:00
Jeffrey Yasskin
c200d5e99f
Make OProfile support compile again after r93630 removed
...
DebugLocTuple. Also use an AssertingVH to ensure that MDNodes aren't
destroyed while the FilenameCache is using them.
llvm-svn: 94245
2010-01-22 23:04:39 +00:00
Chris Lattner
6b1e1bb9e9
move sleb printing out of asmprinter into dwarf printer, make clients
...
handle the comment better, MCize the non-.sleb case.
llvm-svn: 94244
2010-01-22 22:56:55 +00:00
Devang Patel
81f0fa06d7
Remove MetadataBase class because it is not adding significant value.
...
llvm-svn: 94243
2010-01-22 22:52:10 +00:00
Dale Johannesen
b1ebe8137b
Ignore DEBUG_VALUE when building live intervals;
...
this makes the code work transparently the same
whether they're there or not.
llvm-svn: 94240
2010-01-22 22:38:21 +00:00
Chris Lattner
576e41a375
add a new DwarfPrinter::EmitEncodingByte method which handles
...
pretty printing encoding comments and eliminates redundancy on
the client side. We now get pretty dwarf like this again:
.byte 255 ## @LPStart Encoding = omit
.byte 0 ## @TType Encoding = absptr
.byte 0x28 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 0x1a ## Call site table size
...
llvm-svn: 94239
2010-01-22 22:38:16 +00:00
Chris Lattner
7976cac884
rename the dwarf class to DwarfPrinter. This matches the filename
...
and much more accurately describes what it is all about.
llvm-svn: 94233
2010-01-22 22:23:57 +00:00
Chris Lattner
6779ef9325
fix indentation
...
llvm-svn: 94232
2010-01-22 22:19:51 +00:00
Chris Lattner
2fa5f5ce56
inline away the trivial AsmPrinter::EOL() method.
...
llvm-svn: 94230
2010-01-22 22:09:00 +00:00
Chris Lattner
19abca37d2
inline AsmPrinter::PrintHex into its two trivial callers.
...
llvm-svn: 94228
2010-01-22 21:57:56 +00:00
Chris Lattner
0347671f14
change this to be a static function instead of a method on asmprinter.
...
llvm-svn: 94227
2010-01-22 21:50:41 +00:00
Chris Lattner
92531ea22d
make the loop comment printer print out a much better structured
...
output. An example:
.align 4, 0x90
LBB1_5: ## %while.cond3
## Parent Loop BB1_1 Depth=1
## => This Loop Header: Depth=2
## Child Loop BB1_8 Depth 3
## Child Loop BB1_6 Depth 3
llvm-svn: 94225
2010-01-22 21:43:28 +00:00
Chris Lattner
639c136993
Changes to fix buffering that I forgot to commit with previous patch.
...
llvm-svn: 94222
2010-01-22 21:16:10 +00:00
Chris Lattner
bc2e117803
For blocks that are not loop headers, just print their loop depth and header BB.
...
For loop headers, print Inner loop along with the other stuff so it doesn't take
an extra line. We now get stuff like this:
LBB1_4: ## %land.end
## in Loop: Header=BB1_1 Depth=1
notb %al
testb $1, %al
jne LBB1_8
and:
LBB1_6: ## %while.cond7
## Inner Loop Header: Depth=3
## Inside Loop BB1_5 Depth 2
## Inside Loop BB1_1 Depth 1
which still isn't great for loop headers, but is much less verbose.
llvm-svn: 94221
2010-01-22 21:11:06 +00:00
Chris Lattner
c234f18c07
reenable the label loop comments and switch them to use the formatted
...
comment emission stuff. I'm going to rewrite this though because the
current output doesn't make sense.
llvm-svn: 94215
2010-01-22 21:00:45 +00:00
Daniel Dunbar
5d1a686840
Mark EH_RETURN64 as CodeGenOnly.
...
llvm-svn: 94205
2010-01-22 20:16:37 +00:00
Benjamin Kramer
a56f170cc0
Another strncmp -> StringRef.startswith simplification.
...
llvm-svn: 94203
2010-01-22 20:00:21 +00:00
Chris Lattner
bc01d5b148
Convert some more random-comment-printing stuff to use
...
AddComment and GetCommentOS. Add a blank line between globals
(even in non-verbose mode) to make the assembly more readable.
llvm-svn: 94202
2010-01-22 19:52:01 +00:00
Chris Lattner
20390f5205
add a new MCAsmStreamer::GetCommentOS method to simplify stuff
...
that doesn't want to use twines.
llvm-svn: 94199
2010-01-22 19:17:48 +00:00
Bob Wilson
8d14b72877
Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bison
...
test on ARM.
llvm-svn: 94198
2010-01-22 19:16:40 +00:00
Chris Lattner
5fb9cab9dc
add missing break, PR6114, patch by M Wahab.
...
llvm-svn: 94197
2010-01-22 19:11:53 +00:00
Victor Hernandez
b2ccd2be93
Fix/strengthen verification of llvm.dbg.declare
...
llvm-svn: 94195
2010-01-22 19:06:12 +00:00
Victor Hernandez
e4d8ef8fc4
Keep ignoring pointer-to-pointer bitcasts
...
llvm-svn: 94194
2010-01-22 19:05:05 +00:00
Chris Lattner
f0076f14df
use both the Mangler and the CBE's mangler for identifiers,
...
this should fix a problem duncan saw handling symbols with '.' in them.
llvm-svn: 94192
2010-01-22 18:33:00 +00:00
Chris Lattner
784036d536
rename addComment -> AddComment for consistency.
...
llvm-svn: 94190
2010-01-22 18:21:35 +00:00
Benjamin Kramer
13b3fa1f36
Simplify some uses of str(n)cmp with StringRef.
...
llvm-svn: 94189
2010-01-22 18:21:23 +00:00
Torok Edwin
46925cc515
Fix TimeValue::now() on Unix.
...
TimeValue()::now().toEpochTime() is supposed to be the same as time(),
but it wasn't, because toEpoch subtracted PosixZeroTime, but now()
didn't add PosixZeroTime!
Add a unittest to check this works.
llvm-svn: 94178
2010-01-22 15:51:31 +00:00
Dan Gohman
a527ad10cc
Revert r94066, which was the patch which added a Verifier pass after
...
LoopStrengthReduce, as it's causing too much trouble (even with the
old LoopStrengthReduce code).
llvm-svn: 94172
2010-01-22 10:48:28 +00:00
Chris Lattner
af1c74d7e1
add comment support to the rest of the directives.
...
llvm-svn: 94168
2010-01-22 07:36:39 +00:00
Chris Lattner
e773b145a2
stop using strtoll, it gives windows heartburn.
...
llvm-svn: 94167
2010-01-22 07:34:12 +00:00
Chris Lattner
df1b7b6164
Add the ability for MCStreamer to emit comments on the same line as directives.
...
Switch over the asm-verbose comment for double values to use it. We now get:
_x:
.long 343597384 ## double 1.231200e+02
.long 1079953326
For example, note that the comment is on the same line as the .long. Woo.
llvm-svn: 94166
2010-01-22 07:29:22 +00:00
Chris Lattner
5eb0c8a2bd
pass "-fasm-verbose" into createAsmStreamer.
...
llvm-svn: 94165
2010-01-22 07:06:15 +00:00
Chris Lattner
276811b58a
Stop building RTTI information for *most* llvm libraries. Notable
...
missing ones are libsupport, libsystem and libvmcore. libvmcore is
currently blocked on bugpoint, which uses EH. Once it stops using
EH, we can switch it off.
This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.
llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Chris Lattner
437827ceb5
give PassNameParser a home.
...
llvm-svn: 94162
2010-01-22 06:29:25 +00:00
Chris Lattner
cb9776c350
add an out-of-line virtual method to CmpInst to give it a home.
...
llvm-svn: 94161
2010-01-22 06:25:37 +00:00
Chris Lattner
c07d7f41e3
elimiante the dynamic_cast's from opt.
...
llvm-svn: 94160
2010-01-22 06:03:06 +00:00
Chris Lattner
2a96a8340e
drop the pass name from the output.
...
llvm-svn: 94158
2010-01-22 05:52:51 +00:00
Chris Lattner
7ad458c173
eliminate dynamic_cast from this file.
...
llvm-svn: 94157
2010-01-22 05:46:59 +00:00
Chris Lattner
f683d7d909
eliminate a bunch more unneeded dynamic_cast's.
...
llvm-svn: 94156
2010-01-22 05:37:10 +00:00
Chris Lattner
1bd9c3ec88
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94155
2010-01-22 05:24:46 +00:00
Chris Lattner
997ad42b6d
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94154
2010-01-22 04:55:08 +00:00
Evan Cheng
72dbbce547
Teach pre-regalloc scheduler to schedule loads from nearby addresses. It may improve cache locality. This is controlled by -cluster-loads for now.
...
llvm-svn: 94148
2010-01-22 03:36:51 +00:00
Evan Cheng
8e25244a48
Add two target hooks to determine whether two loads are near and should be scheduled together.
...
llvm-svn: 94147
2010-01-22 03:34:51 +00:00
Chris Lattner
12c9016e6e
add new file
...
llvm-svn: 94132
2010-01-22 01:58:44 +00:00
Chris Lattner
c0e2ef62fa
move some files out of the llvm-mc tool into the MCParser library so
...
other tools can link it.
llvm-svn: 94131
2010-01-22 01:58:08 +00:00
Chris Lattner
84c0345065
forgot to svn add these, doh.
...
llvm-svn: 94130
2010-01-22 01:55:10 +00:00
Chris Lattner
9a84d96edf
create a new MCParser library and move some stuff into it.
...
llvm-svn: 94129
2010-01-22 01:44:57 +00:00
Chris Lattner
2b19da4fa0
stub out a new TargetAsmLexer interface.
...
llvm-svn: 94125
2010-01-22 00:58:59 +00:00
Dan Gohman
525f7d7833
Revert LoopStrengthReduce.cpp to pre-r94061 for now.
...
llvm-svn: 94123
2010-01-22 00:46:49 +00:00
Jim Grosbach
231a0d01a9
Fix PR5694. The CMN instructions set the flags differently from CMP, so they
...
cannot be directly interchanged for comparisons against negated values.
Disable the CMN instructions for the time being.
llvm-svn: 94119
2010-01-22 00:08:13 +00:00
Victor Hernandez
728ab49966
No need to look through bitcasts for DbgInfoIntrinsic
...
llvm-svn: 94114
2010-01-21 23:09:12 +00:00
Victor Hernandez
ef9e66c909
DbgInfoIntrinsic no longer appear in an instruction's use list
...
llvm-svn: 94113
2010-01-21 23:08:36 +00:00
Victor Hernandez
1cc721ee56
No need to look through bitcasts for DbgInfoIntrinsic
...
llvm-svn: 94112
2010-01-21 23:07:15 +00:00
Victor Hernandez
d44671b931
DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics()
...
llvm-svn: 94111
2010-01-21 23:05:53 +00:00
Dan Gohman
23ac1f6157
When inserting expressions for post-increment users which contain
...
loop-variant components, adds must be inserted after the increment.
Keep track of the increment position for this case, and insert
these adds in the correct location.
llvm-svn: 94110
2010-01-21 23:01:22 +00:00
Dan Gohman
2c93a3fa96
Include IVUsers information in LSR's debug output.
...
llvm-svn: 94108
2010-01-21 22:46:32 +00:00
Dan Gohman
3cce294b13
Prune the search for candidate formulae if the number of register
...
operands exceeds the number of registers used in the initial
solution, as that wouldn't lead to a profitable solution anyway.
llvm-svn: 94107
2010-01-21 22:42:49 +00:00
Evan Cheng
c3ad04c825
Trim unneeded includes.
...
llvm-svn: 94105
2010-01-21 21:44:43 +00:00
Dan Gohman
a4954135a7
Add a comment.
...
llvm-svn: 94104
2010-01-21 21:31:09 +00:00
Chris Lattner
642049e127
It turns out that this #include is needed because otherwise
...
ValueMapper.cpp ends up calling an out of line
__ZNK4llvm12PATypeHolder3getEv, which is a template and llvm-config
determines arbitrarily to use the one in libipo. This sucks, but
keeping the #include is a reasonable workaround.
llvm-svn: 94103
2010-01-21 21:29:25 +00:00