Devang Patel
12563b3495
Add support to emit dwarf ranges.
...
llvm-svn: 101575
2010-04-16 23:33:45 +00:00
Jakob Stoklund Olesen
ae372e2ce0
Use a simpler data structure to calculate the least recently used register in RegAllocLocal.
...
This makes the local register allocator about 20% faster.
llvm-svn: 101574
2010-04-16 23:32:37 +00:00
Johnny Chen
c275414575
Cast to (uint64_t) instead of relying on the "ul" suffix.
...
llvm-svn: 101573
2010-04-16 23:30:28 +00:00
Chris Lattner
de023a3c1d
building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
...
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.
This is a really terrible problem which was causing -g to affect codegen
because it would permute the memory image of the compiler process.
Thanks to Dale for expertly hunting it down.
llvm-svn: 101565
2010-04-16 23:04:30 +00:00
Dan Gohman
9becdddc49
Add skeleton target-specific SelectionDAGInfo files.
...
llvm-svn: 101564
2010-04-16 23:04:22 +00:00
Johnny Chen
ed9bee150b
Fixed logic error. Should check Builder for validity before calling SetSession
...
on it.
llvm-svn: 101563
2010-04-16 23:02:25 +00:00
Chris Lattner
5518b81a98
move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().
...
No functionality change.
llvm-svn: 101562
2010-04-16 22:59:24 +00:00
Chris Lattner
4422d31b84
introduce a new CallGraphSCC class, and pass it around
...
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>. No functionality change,
but now we have a much tidier interface.
llvm-svn: 101558
2010-04-16 22:42:17 +00:00
Johnny Chen
b90b6f1a35
Fixed a bug in DisassembleN1RegModImmFrm() where a break stmt was missing for a
...
case. Also, the 0xFF hex literal involved in the shift for ESize64 should be
suffixed "ul" to preserve the shift result.
Implemented printHex*ImmOperand() by copying from ARMAsmPrinter.cpp and added a
test case for DisassembleN1RegModImmFrm()/printHex64ImmOperand().
llvm-svn: 101557
2010-04-16 22:40:20 +00:00
Evan Cheng
f037f87bde
(i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until -promote-16bit is enabled.
...
llvm-svn: 101551
2010-04-16 22:26:19 +00:00
Chris Lattner
6d1208fd2b
move PrintCallGraphPass out of the middle of CGPassManager.
...
llvm-svn: 101543
2010-04-16 21:43:55 +00:00
Chris Lattner
d4758fc393
add a missing break back, patch by Nico Schmidt!
...
llvm-svn: 101538
2010-04-16 21:15:15 +00:00
Dan Gohman
c4759a5b97
Create a new TargetSelectionDAGInfo class. This will eventually acquire
...
SelectionDAG-specific parts of TargetLowering.
llvm-svn: 101537
2010-04-16 21:12:11 +00:00
Dan Gohman
4d273f4519
Commit this, which should have accompanied 101531.
...
llvm-svn: 101532
2010-04-16 20:22:43 +00:00
Dan Gohman
148c69a3f6
Eliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.
...
llvm-svn: 101531
2010-04-16 20:11:05 +00:00
Johnny Chen
2b7aba10c2
In the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOperand(),
...
this patch removes the assert() from printAddrMode3OffsetOperand() and adds a test case.
llvm-svn: 101529
2010-04-16 19:57:21 +00:00
Johnny Chen
807e1748fc
Multiclass LdStCop was using pre-UAL syntax LDC<c>L for the L fragment. Changed
...
to the UAL syntax of LDCL<c>, instead.
Add a test case for this change which also tests the removal of assert() from
printAddrMode2OffsetOperand().
llvm-svn: 101527
2010-04-16 19:33:23 +00:00
Johnny Chen
88599a42bb
Remove the assert() from printAddrMode2OffsetOperand(). "#0 and #-0" are
...
considered legal instructions.
Refs: A8.6.51 LDC, LDC2 (immediate) -- page A8-107, A8.6.58 LDR (immediate, ARM)
-- page A8-121, and A8.6.194 STR (immediate, ARM) -- page A8-395.
llvm-svn: 101524
2010-04-16 19:10:52 +00:00
Evan Cheng
954bd598dd
80 col.
...
llvm-svn: 101501
2010-04-16 17:58:41 +00:00
Evan Cheng
d6b0a7c075
80 col.
...
llvm-svn: 101500
2010-04-16 17:57:59 +00:00
Dan Gohman
3a7ee8eead
Avoid creating virtual registers for unused values.
...
llvm-svn: 101480
2010-04-16 17:15:02 +00:00
Dan Gohman
5664b9f1a9
Fix an assertion string.
...
llvm-svn: 101478
2010-04-16 16:55:18 +00:00
Dan Gohman
4572a9f479
Fix a comment.
...
llvm-svn: 101477
2010-04-16 16:52:37 +00:00
Dan Gohman
f13f69f296
Disable inlining of recursive calls. It can complicate tailcallelim and
...
dependent analyses, and increase code size, so doing it profitably would
require more complex heuristics.
llvm-svn: 101471
2010-04-16 16:01:18 +00:00
Dan Gohman
99e5327bfd
Refine the detection of seemingly infinitely recursive calls where the
...
callee is expected to be expanded to something else by codegen, so that
normal infinitely recursive calls are still transformed.
llvm-svn: 101468
2010-04-16 15:57:50 +00:00
Gabor Greif
f375520f7b
reapply r101434
...
with a fix for self-hosting
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101465
2010-04-16 15:33:14 +00:00
Dan Gohman
b3862ecd48
Make callIsSmall accessible as a utility function.
...
llvm-svn: 101463
2010-04-16 15:14:50 +00:00
Dan Gohman
12293815de
Fix SCEVCommutativeExpr::print to be robust in the case of improper
...
expression canonicalization. Its job is to print what's there, not to
make judgements about it.
llvm-svn: 101461
2010-04-16 15:03:25 +00:00
Bill Wendling
929f3c0927
The JIT calls TidyLandingPads to tidy up the landing pads. However, because the
...
JIT doesn't use the MC back-end asm printer to emit labels that it uses, the
section for the MCSymbol is never set. And thus the MCSymbol for the EH label
isn't marked as "defined". Because of that, TidyLandingPads removes the needed
landing pads from the JIT output. This breaks EH for every JIT program.
This is a work-around for this limitation. We pass in the label locations
map. If the label has a non-zero value, then it was "emitted" by the JIT and
TidyLandingPads shouldn't remove that label.
A nicer solution would be to mark the MCSymbol as "used" by the JIT and not rely
upon the section being set to determine if it's defined or not.
llvm-svn: 101453
2010-04-16 08:46:10 +00:00
Evan Cheng
af56facacd
Adding support for dag combiner to promote operations for profit. This requires target specific queries. For example, x86 should promote i16 to i32 when it does not impact load folding.
...
x86 support is off by default. It can be enabled with -promote-16bit.
Work in progress.
llvm-svn: 101448
2010-04-16 06:14:10 +00:00
Evan Cheng
3da64f7672
Use getAL() rather than a major constant.
...
llvm-svn: 101446
2010-04-16 05:46:06 +00:00
Dan Gohman
5563473062
Refine further the scope where the global DebugLoc value is active.
...
llvm-svn: 101443
2010-04-16 05:06:56 +00:00
Eric Christopher
206d7ce582
Silence an unused variable warning.
...
llvm-svn: 101438
2010-04-16 04:02:04 +00:00
Chris Lattner
bd2d9430d6
fix comment noticed by Bob
...
llvm-svn: 101437
2010-04-16 02:32:17 +00:00
Gabor Greif
403e9694f9
back out r101423 and r101397, they break llvm-gcc self-host on darwin10
...
llvm-svn: 101434
2010-04-16 01:16:20 +00:00
Chris Lattner
1146d326a7
fix PR6832: we were using the alignment of a pointer when we
...
wanted the alignment of the pointee.
llvm-svn: 101432
2010-04-16 01:05:38 +00:00
Chris Lattner
b73552908e
improve comments.
...
llvm-svn: 101429
2010-04-16 00:38:19 +00:00
Chris Lattner
78d7dbbc30
pull all the ConvertToScalarInfo code together into one
...
place.
llvm-svn: 101427
2010-04-16 00:24:57 +00:00
Chris Lattner
d69c3ee958
more refactoring: suck some stuff out of SRoA into
...
ConvertToScalarInfo.
llvm-svn: 101425
2010-04-16 00:20:00 +00:00
Gabor Greif
6af0ad846e
shift intrinsic operand
...
llvm-svn: 101423
2010-04-16 00:06:45 +00:00
Chris Lattner
9ef4eae6e6
introduce a new ConvertToScalarInfo struct to simplify
...
CanConvertToScalar/MergeInType. Eliminate a pointless
LLVMContext argument to MergeInType.
llvm-svn: 101422
2010-04-15 23:50:26 +00:00
Jakob Stoklund Olesen
cdc3df4888
Avoid sinking machine instructions into a loop.
...
MachineLoopInfo is already available when MachineSinking runs, so the check is
free.
There is no test case because it would require a critical edge into a loop, and
CodeGenPrepare splits those. This check is just to be extra careful.
llvm-svn: 101420
2010-04-15 23:41:02 +00:00
Johnny Chen
acbc06c2a3
Fixed a bug in ARM disassembly where LDRSBT should have am3offset operand, not
...
am2offset. Modified the instruction table entry and added a new test case.
llvm-svn: 101415
2010-04-15 23:12:47 +00:00
Evan Cheng
f7f97b4bbd
Use default lowering of DYNAMIC_STACKALLOC. As far as I can tell, ARM isle is doing the right thing and codegen looks correct for both Thumb and Thumb2.
...
llvm-svn: 101410
2010-04-15 22:20:34 +00:00
Chris Lattner
9c1172d848
tidy interface to isOnlyCopiedFromConstantGlobal
...
llvm-svn: 101405
2010-04-15 21:59:20 +00:00
Gabor Greif
33ae80bff7
reapply r101364, which has been backed out in r101368
...
with a fix
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101397
2010-04-15 20:51:13 +00:00
Jakob Stoklund Olesen
b642a27525
Fix PR6847. RegScavenger should ignore DebugValues.
...
llvm-svn: 101392
2010-04-15 20:28:39 +00:00
Nicolas Geoffray
19cd1d84ad
Make sure the initialization of a GC root is after its definition.
...
llvm-svn: 101388
2010-04-15 19:53:35 +00:00
Anton Korobeynikov
839cdaa70a
Revert r100896 and around - this breaks the only mingw32 buildbot we have.
...
llvm-svn: 101387
2010-04-15 19:51:42 +00:00
Gabor Greif
b36d07cb93
prune includes
...
llvm-svn: 101385
2010-04-15 19:44:21 +00:00