Chris Lattner
4025306a91
disable optimizations in this directory for MSVC9. This avoids
...
an optimizer infinite loop on the file, PR6866.
llvm-svn: 101854
2010-04-20 01:11:32 +00:00
Johnny Chen
2161e9f03b
Better error-handling for DisassembleThumb2DPModImm() with 2-reg operands where
...
d==15 is considered illegal. Return false instead of assert().
llvm-svn: 101852
2010-04-20 01:01:57 +00:00
Eric Christopher
64831c6a4c
Remove the palignr intrinsics now that we lower them to vector shuffles,
...
shifts and null vectors. Autoupgrade these to what we'd lower them to.
Add a testcase to exercise this.
llvm-svn: 101851
2010-04-20 00:59:54 +00:00
Dan Gohman
eadc04badc
Remove this debug output; it isn't that useful, and it's incomplete
...
in the case where a basic block is split.
llvm-svn: 101850
2010-04-20 00:56:44 +00:00
Dan Gohman
e450d7444d
Sink DebugLoc handling out of SelectionDAGISel into FastISel and
...
SelectionDAGBuilder, where it doesn't have to be as complicated.
llvm-svn: 101848
2010-04-20 00:48:35 +00:00
Chris Lattner
aedb8a3535
make CallGraphNode dtor abort if a node is deleted when there are still
...
references to it.
llvm-svn: 101847
2010-04-20 00:47:34 +00:00
Chris Lattner
a5cdd5e6a2
make the inliner do less work for leaf functions.
...
llvm-svn: 101846
2010-04-20 00:47:08 +00:00
Chris Lattner
e93846762a
Fix rdar://7879828 - crash in CallGraph, a self host issue.
...
Arg promotion was deleting call graph nodes that still had references
from the 'indirect' CGN. Like the inliner, it should only delete the
function if all references are gone.
llvm-svn: 101845
2010-04-20 00:46:50 +00:00
Dan Gohman
3df671a81c
Remove MachineFunction's DefaultDebugLoc member, and make DwarfDebug.cpp
...
responsible for figuring out what that's supposed to be on its own.
llvm-svn: 101844
2010-04-20 00:37:27 +00:00
Dan Gohman
ca35aa1122
Reapply the removal of SelectionDAGISel's BB, with a fix for the case
...
where multiple blocks are emitted; functions which do this need to return
the new BB so that their callers can stay current.
llvm-svn: 101843
2010-04-20 00:29:35 +00:00
Bob Wilson
92a4685dd2
Fix tests for Neon load/store intrinsics to match the i8* types expected by
...
the intrinsics. The reason for those i8* types is that the intrinsics are
overloaded on the vector type and we don't have a way to declare an intrinsic
where one argument is an overloaded vector type and another argument is a
pointer to the vector element type. The bitcasts added here will match what
the frontend will typically generate when these intrinsics are used.
llvm-svn: 101840
2010-04-20 00:17:16 +00:00
Johnny Chen
f3dd8b9487
More IT instruction error-handling improvements from fuzzing.
...
llvm-svn: 101839
2010-04-20 00:15:41 +00:00
Dan Gohman
be2e727a38
Revert 101825, which is causing trouble.
...
llvm-svn: 101832
2010-04-19 23:34:15 +00:00
Dan Gohman
35bc4d46cb
Make BreakAntiDependencies' SUnits argument const, and make the Begin
...
and End arguments by-value rather than by-reference.
llvm-svn: 101830
2010-04-19 23:11:58 +00:00
Johnny Chen
e62b680965
Better error handling of invalid IT mask '0000', instead of just asserting.
...
llvm-svn: 101827
2010-04-19 23:02:58 +00:00
Dan Gohman
8cccc542f6
Eliminate SelectionDAGISel's "current block" member. Just pass it as
...
an argument to things that need it.
llvm-svn: 101825
2010-04-19 22:51:14 +00:00
Dan Gohman
5ccd0b3686
Delete an unnecessary reference to SelectionDAGISel::BB.
...
llvm-svn: 101824
2010-04-19 22:48:45 +00:00
Dan Gohman
7c0303a059
Eliminate the CurMBB member from SelectionDAGBuilder. For places that
...
need it, just pass around the parent block of the current instruction
explicitly.
llvm-svn: 101822
2010-04-19 22:41:47 +00:00
Dan Gohman
e637ff5e9a
Remove the Expr member from IVUsers. Instead of remembering the expression,
...
just ask ScalarEvolution for it on demand. This helps IVUsers be more robust
in the case of expressions changing underneath it. This fixes PR6862.
llvm-svn: 101819
2010-04-19 21:48:58 +00:00
Johnny Chen
777346e749
According to A8.6.16 B (Encoding T3) and A8.3 Conditional execution -- A8.3.1
...
Pseudocode details of conditional, Condition bits '111x' indicate the
instruction is always executed. That is, '1111' is a leagl condition field
value, which is now mapped to ARMCC::AL.
Also add a test case for condition field '1111'.
llvm-svn: 101817
2010-04-19 21:19:52 +00:00
Devang Patel
561fa8490e
Fix typo. add a test case.
...
llvm-svn: 101812
2010-04-19 20:31:39 +00:00
Evan Cheng
e19aa5cc52
More progress on promoting i16 operations to i32 for x86. Work in progress.
...
llvm-svn: 101808
2010-04-19 19:29:22 +00:00
Dan Gohman
1e95790fd4
Give SelectionDAG a TargetMachine too, rather than having it
...
fetch one from the MachineFunction.
llvm-svn: 101807
2010-04-19 19:22:07 +00:00
Evan Cheng
e7c21a4242
More 80 col violation.
...
llvm-svn: 101806
2010-04-19 19:17:44 +00:00
Devang Patel
6188093cca
Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.
...
llvm-svn: 101805
2010-04-19 19:14:02 +00:00
Dan Gohman
c334960f16
Code that needs a TargetMachine should have access to one directly, rather
...
than just getting one through a TargetLowering.
llvm-svn: 101802
2010-04-19 19:05:59 +00:00
Dan Gohman
a91754da67
Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
...
SelectionDAG-specific.
llvm-svn: 101801
2010-04-19 18:41:46 +00:00
Dan Gohman
0557cd7d89
Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can
...
be done with const_cast.
llvm-svn: 101798
2010-04-19 18:33:28 +00:00
Dan Gohman
e6a9912a76
Remove -module, which appears to be a leftover from prior libtool usage.
...
llvm-svn: 101793
2010-04-19 18:11:02 +00:00
Dan Gohman
b0071d041f
This doesn't need SmallVector.h anymore.
...
llvm-svn: 101790
2010-04-19 17:51:31 +00:00
Mikhail Glushenkov
9cfb7051b6
Support .a files directly (without -l).
...
llvm-svn: 101789
2010-04-19 17:25:38 +00:00
Johnny Chen
25df2a75bd
Better error-handling for DisassembleThumb2DPSoReg() where the 3-reg operand
...
instructions should have Rd (Inst{11-8}) != 0b1111.
Ref: A6.3 32-bit Thumb instruction encoding
A6.3.11 Data-processing (shifted register)
llvm-svn: 101788
2010-04-19 17:16:40 +00:00
Dan Gohman
3457061a66
Fix this for std::vectors which don't have .data().
...
llvm-svn: 101785
2010-04-19 16:33:28 +00:00
Johnny Chen
cbe3e1a3df
ARM disassembler did not react to recent changes to the NEON instruction table.
...
VLD1q*_UPD and VST1q*_UPD have the ${dst:dregpair} operand now.
llvm-svn: 101784
2010-04-19 16:20:34 +00:00
Benjamin Kramer
3576b74bb9
Don't write into MemoryBuffers.
...
llvm-svn: 101783
2010-04-19 16:15:31 +00:00
Dan Gohman
f656397cc0
Fix -Wcast-qual warnings.
...
llvm-svn: 101782
2010-04-19 15:55:10 +00:00
Dan Gohman
a84dc0cc6e
Revert 91528 and use a std::vector instead, fixing an abuse of std::string.
...
llvm-svn: 101781
2010-04-19 15:54:44 +00:00
Dan Gohman
60a52c5fcf
Fix -Wcast-qual warnings.
...
llvm-svn: 101779
2010-04-19 15:42:05 +00:00
Dan Gohman
3bb1bcbe6d
Add a few more ELF bits.
...
llvm-svn: 101778
2010-04-19 15:40:15 +00:00
Dan Gohman
b204fd4308
Add a const.
...
llvm-svn: 101777
2010-04-19 15:39:27 +00:00
Dan Gohman
26e7d81df8
These functions don't need to access this.
...
llvm-svn: 101776
2010-04-19 15:38:38 +00:00
Anton Korobeynikov
7b056bfed0
Add missed part of prev. commit
...
llvm-svn: 101755
2010-04-18 20:41:42 +00:00
Anton Korobeynikov
7d62e33291
Make processor FUs unique for given itinerary. This extends the limit of 32
...
FU per CPU arch to 32 per intinerary allowing precise modelling of quite
complex pipelines in the future.
llvm-svn: 101754
2010-04-18 20:31:01 +00:00
Chris Lattner
d3db453d15
avoid temporary std::string in non posix_spawn path.
...
llvm-svn: 101723
2010-04-18 17:34:10 +00:00
Benjamin Kramer
5b4be748cb
Eliminate temporary string.
...
llvm-svn: 101711
2010-04-18 09:19:41 +00:00
Benjamin Kramer
1360e9e270
Properly inherit the environment on darwin where environ is not available for shared libraries.
...
llvm-svn: 101710
2010-04-18 09:16:04 +00:00
Nick Lewycky
554a39889b
This is horrible. Split the difference, and declare 'environ' on all non-Darwin
...
platforms to unbreak the darwin and linux builds. The BSD folks should feel
free to change the #if, if this breaks them.
llvm-svn: 101703
2010-04-18 07:07:48 +00:00
Nick Lewycky
320aa4a493
Revert r101701, Darwin doesn't have 'environ'. Go figure.
...
llvm-svn: 101702
2010-04-18 06:44:21 +00:00
Nick Lewycky
3fdf58800a
Fix linux build. posix_spawn doesn't inherit the environment by default.
...
llvm-svn: 101701
2010-04-18 06:22:26 +00:00
Chris Lattner
a50738abba
make Program::Execute use posix_spawn on systems that support it,
...
as it is more efficient than fork/exec.
Thanks to Eric for adding the autoconf check. It would be nice if
a cmake guru could add a cmake check for posix_spawn as well.
llvm-svn: 101693
2010-04-18 04:14:37 +00:00
Chris Lattner
1049e1ce1f
reduce indentation
...
llvm-svn: 101692
2010-04-18 03:35:23 +00:00
Chris Lattner
d9e22a8a61
unnest from namespace.
...
llvm-svn: 101691
2010-04-18 03:33:55 +00:00
Chris Lattner
3448f4e448
silence some -Wmissing-field-initializers warnings.
...
llvm-svn: 101690
2010-04-18 03:30:32 +00:00
Chris Lattner
f58e8c0846
silence some unused-value warnings.
...
llvm-svn: 101689
2010-04-18 03:28:20 +00:00
Bill Wendling
268195e1d4
Don't rely upon the MCSymbol "isDefined" method to indicate if a label has been
...
emitted or not. The JIT doesn't set that. Look it up in the label location table
instead.
llvm-svn: 101686
2010-04-18 00:56:05 +00:00
Bill Wendling
47d742000b
Formatting changes. No functionality change.
...
llvm-svn: 101685
2010-04-18 00:52:08 +00:00
Bill Wendling
c4adfa3467
Add a "PadTo" field to the emitULEB128Bytes method. This will pad out to the
...
indicated number of bytes.
llvm-svn: 101684
2010-04-18 00:51:49 +00:00
Nick Lewycky
fbe8d2803d
Fix declarations in a few more tests.
...
llvm-svn: 101676
2010-04-17 21:29:25 +00:00
Daniel Dunbar
c459a0ff81
Revert "reject forward references to functions whose type don't match", because DJG told me to!
...
llvm-svn: 101675
2010-04-17 21:24:55 +00:00
Nick Lewycky
d4c0f86a5e
Fix intrinsic signature in this test.
...
llvm-svn: 101674
2010-04-17 21:12:55 +00:00
Chris Lattner
5a44950aae
reject forward references to functions whose type don't match
...
up with the definition (and fix a broken testcase). PR6491.
llvm-svn: 101670
2010-04-17 20:45:56 +00:00
Dale Johannesen
0b685eb778
Add comment (lost when reverting and reapplying 101503).
...
llvm-svn: 101664
2010-04-17 19:56:46 +00:00
Chris Lattner
2b3a32f7a0
doh, didn't mean to check in my hackaround lit sucking. :)
...
llvm-svn: 101663
2010-04-17 19:04:03 +00:00
Chris Lattner
0a8d91a816
fix PR6332, allowing an index of zero into a zero sized array
...
even if the element of the array has no size.
llvm-svn: 101662
2010-04-17 19:02:33 +00:00
Chris Lattner
b927073f2e
teach the x86 asm parser how to handle segment prefixes
...
in memory operands. rdar://7874844
llvm-svn: 101661
2010-04-17 18:56:34 +00:00
Chris Lattner
926885c090
refactor .if handling code a bit.
...
llvm-svn: 101659
2010-04-17 18:14:27 +00:00
Chris Lattner
67e70971cc
fix PR6858: a dangling pointer use bug which was caused
...
by switching CachedFunctionInfo from a std::map to a
ValueMap (which is implemented in terms of a DenseMap).
DenseMap has different iterator invalidation semantics
than std::map.
This should hopefully fix the dragonegg builder.
llvm-svn: 101658
2010-04-17 17:57:56 +00:00
Chris Lattner
cea19a475b
a bunch of cleanups and tweaks, no functionality changes.
...
llvm-svn: 101657
2010-04-17 17:55:00 +00:00
Dan Gohman
7a0fde90f5
Fix more -Wcast-qual warnings.
...
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Dan Gohman
1f0f2142cc
Fix -Wcast-qual warnings.
...
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Chris Lattner
05f34394d9
remove a dead variable, PR6856
...
llvm-svn: 101648
2010-04-17 17:28:00 +00:00
Chris Lattner
5495c8e415
testcase for r101538, patch by Nico Schmidt!
...
llvm-svn: 101642
2010-04-17 17:22:06 +00:00
Dan Gohman
53d4a08d2b
Add const qualifiers to TargetLoweringObjectFile usage.
...
llvm-svn: 101640
2010-04-17 16:44:48 +00:00
Dan Gohman
88f7f6aeda
Use const_cast instead of a C-style cast to cast away const.
...
llvm-svn: 101639
2010-04-17 16:43:55 +00:00
Dan Gohman
4fee6f3bdd
Start function numbering at 0.
...
llvm-svn: 101638
2010-04-17 16:29:15 +00:00
Dan Gohman
8422e57baa
Delete now-unnecessary const_casts.
...
llvm-svn: 101637
2010-04-17 15:32:28 +00:00
Dan Gohman
20e094c711
Use cast instead of dyn_cast when assuming success.
...
llvm-svn: 101636
2010-04-17 15:31:16 +00:00
Dan Gohman
21cea8ac2e
Use const qualifiers with TargetLowering. This eliminates several
...
const_casts, and it reinforces the design of the Target classes being
immutable.
SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.
And PIC16's AsmPrinter no longer uses TargetLowering.
llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Dan Gohman
31ae586c74
Move per-function state out of TargetLowering subclasses and into
...
MachineFunctionInfo subclasses.
llvm-svn: 101634
2010-04-17 14:41:14 +00:00
Chandler Carruth
ca0a53ac52
Name these stub files consistently with the SPU and PPC targets' conventions.
...
Also rename the classes appropriately. The CMake build already used these
names.
llvm-svn: 101631
2010-04-17 08:50:29 +00:00
Chris Lattner
7f5088e6de
a bunch of ssse3 instructions are misencoded to think they have an
...
i8 field when they really do not. This fixes rdar://7840289
llvm-svn: 101629
2010-04-17 07:38:24 +00:00
Chris Lattner
7c4f14bf90
reenable r101565, removing a problematic assertion.
...
CGSCC can delete nodes in regions of the callgraph that
have already been visited. If new CG nodes are allocated
to the same pointer, we shouldn't abort, just handle it
correctly by assigning a new number. This should restore
stability by removing invalidated pointers that *will* be
reused from the densemap in the iterator.
llvm-svn: 101628
2010-04-17 07:17:19 +00:00
Evan Cheng
5fdb57cc10
Postra machine licm must add registers defined by loop invariants to *all* of
...
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.
llvm-svn: 101626
2010-04-17 07:07:11 +00:00
Nick Lewycky
04b8eec241
Refresh this documentation. Things have changed a bit in the mean time:
...
- LLVMgold.so --> libLLVMgold.so
- the GCC LTO project is no longer 'upcoming'
- document the plugin support for 'ar' and 'nm'
llvm-svn: 101624
2010-04-17 07:00:24 +00:00
Evan Cheng
4f3aba431e
Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
...
llvm-svn: 101622
2010-04-17 06:47:47 +00:00
Evan Cheng
f1bd5fcdb4
More work to allow dag combiner to promote 16-bit ops to 32-bit.
...
llvm-svn: 101621
2010-04-17 06:13:15 +00:00
Evan Cheng
829c300ce0
Another 80 col violation.
...
llvm-svn: 101620
2010-04-17 06:12:32 +00:00
Bob Wilson
59b70eacad
Revise my previous change to ExpandBIT_CONVERT. I hadn't realized that this
...
may be called when either the source or destination type is i64, and my
change also hadn't fixed the most obvious problem -- assuming that i64 will
only be bitconverted to f64, ignoring the various vector types.
Radar 7873160.
llvm-svn: 101615
2010-04-17 05:30:19 +00:00
Evan Cheng
3af19e80c9
Add nounwind.
...
llvm-svn: 101613
2010-04-17 03:43:36 +00:00
Bob Wilson
ca51425d94
Re-commit my previous SSAUpdater changes. The previous version naively tried
...
to determine where to place PHIs by iteratively comparing reaching definitions
at each block. That was just plain wrong. This version now computes the
dominator tree within the subset of the CFG where PHIs may need to be placed,
and then places the PHIs in the iterated dominance frontier of each definition.
The rest of the patch is mostly the same, with a few more performance
improvements added in.
llvm-svn: 101612
2010-04-17 03:08:24 +00:00
Bob Wilson
4e5eb5ae1b
As a temporary workaround for post-RA not handling DebugValue instructions,
...
just remove them all. Radar 7873207 (working around the root problem of
Radar 7759363).
llvm-svn: 101604
2010-04-17 00:49:11 +00:00
Jakob Stoklund Olesen
71336f213b
Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."
...
This reverts commit 101392. It broke a buildbot.
llvm-svn: 101595
2010-04-17 00:38:36 +00:00
Dale Johannesen
2543e303e1
Reapply 101503+101520. These are "obviously correct" [Chris]
...
and don't cause any problems on Darwin.
llvm-svn: 101584
2010-04-17 00:08:21 +00:00
Chris Lattner
dddbcba270
disable r101565: an assert is getting triggered. More lurking badness no doubt.
...
llvm-svn: 101583
2010-04-17 00:05:36 +00:00
Chris Lattner
cfc921cd2a
add a note
...
llvm-svn: 101581
2010-04-16 23:52:30 +00:00
Eric Christopher
7258dcd77f
Revert 101465, it broke internal OpenGL testing.
...
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
2010-04-16 23:37:20 +00:00
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
Dan Gohman
37df662b1c
Add a getSelectionDAGInfo member to TargetMachine.
...
llvm-svn: 101567
2010-04-16 23:09:10 +00:00
Chris Lattner
434c053439
update docs for api change.
...
llvm-svn: 101566
2010-04-16 23:07:44 +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
Dan Gohman
fe051a525f
Regenerate configure script.
...
llvm-svn: 101561
2010-04-16 22:59:06 +00:00
Dan Gohman
91f8ad7bd3
Add an autoconf check for -retain-symbols-file and conditionalize
...
use of that option with it. This eliminates an imprecise "Linux"
test, and should help support old versions of gold.
llvm-svn: 101560
2010-04-16 22:58:15 +00:00
Johnny Chen
034e0b1e68
Minor change to make the test case comply with Vd<0> == '0' when Q == '1'.
...
llvm-svn: 101559
2010-04-16 22:48:31 +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
d43a12df56
tidy up
...
llvm-svn: 101548
2010-04-16 21:57:10 +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
Dan Gohman
9dbe61456a
Fix this code to avoid implicit assumptions about the length of the array.
...
llvm-svn: 101530
2010-04-16 20:08:45 +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
Dan Gohman
0591a050ff
Revert 101520, which depended on 101503, which was reverted.
...
llvm-svn: 101528
2010-04-16 19:36:41 +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
Duncan Sands
7fc8123b37
Revert commit 101503 (johannes), in the hope of fixing the dragonegg build,
...
see http://google1.osuosl.org:8011/builders/dragonegg-x86_64-linux/builds/693
Original commit text:
Use a ValueMap not a std::map for the reason indicated
in the comment. This was causing nondeterministic changes
in inlining decisions.
llvm-svn: 101525
2010-04-16 19:28:59 +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
Dan Gohman
076a3278a1
Trim a #include.
...
llvm-svn: 101520
2010-04-16 18:45:11 +00:00
Dan Gohman
c1ce91603c
Revert r101455, which fails on the llvm-arm-linux buildbot.
...
llvm-svn: 101515
2010-04-16 18:37:31 +00:00
Dale Johannesen
3104bf1618
Use a ValueMap not a std::map for the reason indicated
...
in the comment. This was causing nondeterministic changes
in inlining decisions.
llvm-svn: 101503
2010-04-16 18:16:08 +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
Dan Gohman
aa4d9ea465
Delete a blank line.
...
llvm-svn: 101459
2010-04-16 13:32:55 +00:00
Bill Wendling
ae4541d758
Add JIT exception handling test.
...
llvm-svn: 101455
2010-04-16 09:04:28 +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
Chris Lattner
408f79197c
completed my pass over all 6+ months of commits, next step, format and make comprehendable.
...
llvm-svn: 101449
2010-04-16 06:20:22 +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
Eric Christopher
dea3bda860
Add a check for posix_spawn.
...
Regenerate configure and other autoconf files.
llvm-svn: 101444
2010-04-16 05:14:21 +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
Nick Lewycky
bb2ec7de9c
Revert r64616 which worked around http://gcc.gnu.org/PR42757 , we just didn't
...
know it at the time.
llvm-svn: 101439
2010-04-16 04:32:20 +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
393e08536d
move comment.
...
llvm-svn: 101433
2010-04-16 01:05:52 +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
Dan Gohman
0977358509
Create an exports file, so that the plugin only exports the onload symbol.
...
llvm-svn: 101431
2010-04-16 00:43:25 +00:00
Dan Gohman
ebb4ae0912
Make things static that don't need to be referenced from outside the file.
...
llvm-svn: 101430
2010-04-16 00:42:57 +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
1d3ee607b3
Added another test case for am3offset operand, testing Rn, #+/-imm8.
...
Previous checkin tested Rn, #+/-Rm.
llvm-svn: 101418
2010-04-15 23:23:40 +00:00
Jakob Stoklund Olesen
dc6d42dbf8
Add test case for machine-sink on critical edges
...
llvm-svn: 101416
2010-04-15 23:19:16 +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
Dan Gohman
ff9ecb2824
Make the export files absolute paths, and change Makefile.rules
...
to expect them this way, to fix srcdir!=objdir builds.
llvm-svn: 101414
2010-04-15 23:08:00 +00:00
Dan Gohman
1639265421
Add a dependency on the .dir file to make sure that the directory
...
is created before the native exports file is built in a parallel build.
llvm-svn: 101413
2010-04-15 22:46:27 +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
Daniel Dunbar
73fa324609
Don't use absolute path for EXPORTED_SYMBOL_FILE, this breaks under the new
...
system.
llvm-svn: 101404
2010-04-15 21:57:43 +00:00
Dan Gohman
473a53f7b1
Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
...
native linking export files, including running sed to prepend underscores
on darwin, and make use of it in libLTO and libEnhancedDisassembly.
Remove the leading underscores from library export files so that they
work with the new EXPORTED_SYMBOL_FILE support.
llvm-svn: 101399
2010-04-15 20:54:25 +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
Duncan Sands
626b02470b
Pointed out by housel on #llvm.
...
llvm-svn: 101395
2010-04-15 20:35:54 +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
Evan Cheng
1ba1428577
ARM SelectDYN_ALLOC should emit a copy from SP rather than referencing SP directly. In cases where there are two dyn_alloc in the same BB it would have caused the old SP value to be reused and badness ensues. rdar://7493908
...
llvm is generating poor code for dynamic alloca, I'll fix that later.
llvm-svn: 101383
2010-04-15 18:42:28 +00:00
Johnny Chen
4230e35879
DEBUG() print out "Unknown format" msg.
...
llvm-svn: 101382
2010-04-15 18:13:51 +00:00
Dan Gohman
48a189280e
ReuseFrameIndexVals is used in multiple files, so it can't be static.
...
llvm-svn: 101379
2010-04-15 17:34:58 +00:00
Dan Gohman
2085719a98
EnablePPC64RS and EnablePPC32RS are used in multiple files, so they
...
can't be static.
llvm-svn: 101377
2010-04-15 17:20:57 +00:00
Dan Gohman
b29cda9b3c
Fix a bunch of namespace polution.
...
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Dan Gohman
345356ee9a
Fix namespace polution.
...
llvm-svn: 101375
2010-04-15 16:23:27 +00:00
Dan Gohman
4e3c1139a2
Make getPredecessorWithUniqueSuccessorForBB return the unique successor
...
in addition to the predecessor.
llvm-svn: 101374
2010-04-15 16:19:08 +00:00
Gabor Greif
ff3c8b7eaf
typos
...
llvm-svn: 101371
2010-04-15 15:14:46 +00:00
Gabor Greif
9fd00c7d25
back out r101364, as it trips the linux nightlybot on some clang C++ tests
...
llvm-svn: 101368
2010-04-15 12:46:56 +00:00
Benjamin Kramer
a944a9a902
Simplify ".bc" detection.
...
llvm-svn: 101365
2010-04-15 11:33:14 +00:00
Gabor Greif
aafd209632
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: 101364
2010-04-15 10:49:53 +00:00
Chris Lattner
3245afdf05
enhance the load/store narrowing optimization to handle a
...
tokenfactor in between the load/store. This allows us to
optimize test7 into:
_test7: ## @test7
## BB#0: ## %entry
movl (%rdx), %eax
## kill: SIL<def> ESI<kill>
movb %sil, 5(%rdi)
ret
instead of:
_test7: ## @test7
## BB#0: ## %entry
movl 4(%esp), %ecx
movl $-65281, %eax ## imm = 0xFFFFFFFFFFFF00FF
andl 4(%ecx), %eax
movzbl 8(%esp), %edx
shll $8, %edx
addl %eax, %edx
movl 12(%esp), %eax
movl (%eax), %eax
movl %edx, 4(%ecx)
ret
llvm-svn: 101355
2010-04-15 06:10:49 +00:00
Chris Lattner
6ebd8674eb
teach codegen to turn trunc(zextload) into load when possible.
...
This doesn't occur much at all, it only seems to formed in the case
when the trunc optimization kicks in due to phase ordering. In that
case it is saves a few bytes on x86-32.
llvm-svn: 101350
2010-04-15 05:40:59 +00:00
Chris Lattner
f9b2e3c68a
add a simple dag combine to replace trivial shl+lshr with
...
and. This happens with the store->load narrowing stuff.
llvm-svn: 101348
2010-04-15 05:28:43 +00:00
Chris Lattner
4041ab6e00
Implement rdar://7860110 (also in target/readme.txt) narrowing
...
a load/or/and/store sequence into a narrower store when it is
safe. Daniel tells me that clang will start producing this sort
of thing with bitfields, and this does trigger a few dozen times
on 176.gcc produced by llvm-gcc even now.
This compiles code like CodeGen/X86/2009-05-28-DAGCombineCrash.ll
into:
movl %eax, 36(%rdi)
instead of:
movl $4294967295, %eax ## imm = 0xFFFFFFFF
andq 32(%rdi), %rax
shlq $32, %rcx
addq %rax, %rcx
movq %rcx, 32(%rdi)
and each of the testcases into a single store. Each of them used
to compile into craziness like this:
_test4:
movl $65535, %eax ## imm = 0xFFFF
andl (%rdi), %eax
shll $16, %esi
addl %eax, %esi
movl %esi, (%rdi)
ret
llvm-svn: 101343
2010-04-15 04:48:01 +00:00
Dan Gohman
913c998703
Add more const qualifiers for LLVM IR pointers in CodeGen.
...
llvm-svn: 101342
2010-04-15 04:33:49 +00:00
Chris Lattner
60bbb8c356
further tweak this to do something useful.
...
llvm-svn: 101341
2010-04-15 04:31:42 +00:00
Chris Lattner
9ebaf531ab
remove undef control flow.
...
llvm-svn: 101340
2010-04-15 04:30:19 +00:00
Daniel Dunbar
f43481df34
Remove unnecessary uses of <iostream>.
...
llvm-svn: 101338
2010-04-15 03:47:24 +00:00
Daniel Dunbar
5f372e2f13
tests: MC/Disassembler tests depend on ARM support being compiler in.
...
llvm-svn: 101337
2010-04-15 03:47:20 +00:00
Chris Lattner
2df4fa5bc8
fix a crash on "lli ex" or any other file whose name is exactly two
...
characters long.
llvm-svn: 101336
2010-04-15 03:32:19 +00:00
Anders Carlsson
47bccf7f28
Fix build.
...
llvm-svn: 101335
2010-04-15 03:11:28 +00:00
Dan Gohman
bcaf681cde
Add const qualifiers to CodeGen's use of LLVM IR constructs.
...
llvm-svn: 101334
2010-04-15 01:51:59 +00:00
Eric Christopher
eabc9623da
Allow lowering for palignr instructions for mmx sized vectors. Add
...
patterns to handle the lowering.
llvm-svn: 101331
2010-04-15 01:40:20 +00:00
Evan Cheng
87b4f7c1aa
More 80 violations.
...
llvm-svn: 101330
2010-04-15 01:25:27 +00:00
Johnny Chen
0175ec1263
Wrap the error msgs in DEBUG() macro so that they won't appear in NDEBUG build.
...
llvm-svn: 101329
2010-04-15 01:20:56 +00:00
Evan Cheng
8442ef6f89
80 col violations.
...
llvm-svn: 101325
2010-04-15 01:01:55 +00:00
Devang Patel
3d6c40c616
Add comment.
...
llvm-svn: 101317
2010-04-15 00:02:49 +00:00
Devang Patel
97bdf94da3
There is no need to track compile unit offsets if there is only one compile unit.
...
llvm-svn: 101315
2010-04-14 23:56:24 +00:00
Devang Patel
b08ccb62d5
Remove dead code.
...
llvm-svn: 101314
2010-04-14 23:54:13 +00:00
Tobias Grosser
de1a37b872
IPO needs ScalarOpts and InstCombine in its libs
...
The commit "Adding IPSCCP and Internalize passes to the C-bindings" introduced
new dependencies for IPO. Add these to the CMAKE build as otherwise the
BUILD_SHARED_LIBS=1 build fails.
llvm-svn: 101313
2010-04-14 23:42:23 +00:00
Johnny Chen
82c50b11fa
Fixed another assert exposed by fuzzing. Now, the DisassembleVFPLdStMulFrm()
...
function checks whether we have a valid submode for VLDM/VSTM (must be either
"ia" or "db") before calling ARM_AM::getAM5Opc(AMSubMode, unsigned char).
llvm-svn: 101306
2010-04-14 22:37:17 +00:00
Jim Grosbach
32bb362655
Add -arm-long-calls option to force calls to be indirect. This makes the
...
kernel linker happier when dealing with kexts.
Radar 7805069
llvm-svn: 101303
2010-04-14 22:28:31 +00:00
Dan Gohman
20c87b1adf
Fix TrackingVH to handle const Value subclasses.
...
llvm-svn: 101300
2010-04-14 22:24:25 +00:00
Dan Gohman
849833aea3
Remove a const here. This makes this function consistent with all the
...
other getOperand wrappers, and it makes it easier to use with DebugInfo
code, which isn't currently prepared to see const MDNode *.
llvm-svn: 101299
2010-04-14 22:23:05 +00:00
Dan Gohman
0b4df0425f
Constify GetConstantStringInfo.
...
llvm-svn: 101298
2010-04-14 22:20:45 +00:00
Nicolas Geoffray
99bfbca6ec
Don't use DILocation when processing a DebugLoc.
...
llvm-svn: 101294
2010-04-14 22:06:37 +00:00
Johnny Chen
9aaaf4d5fa
For t2BFI disassembly, apply the same error checking as in r101205.
...
Change the error msg to read "Encoding error: msb < lsb".
llvm-svn: 101293
2010-04-14 22:04:45 +00:00
Dan Gohman
7a3dff329f
Move a bunch of methods from CallSite to CallSiteBase, so that they can
...
be used in ImmutableCallSite too.
llvm-svn: 101292
2010-04-14 21:47:32 +00:00
Johnny Chen
7637827064
Fixed another assert exposed by fuzzing. The utility function getRegisterEnum()
...
was asserting because the (RegClass, RegNum) combination doesn't make sense from
an encoding point of view.
Since getRegisterEnum() is used all over the place, to change the code to check
for encoding error after each call would not only bloat the code, but also make
it less readable. An Err flag is added to the ARMBasicMCBuilder where a client
can set a non-zero value to indicate some kind of error condition while building
up the MCInst. ARMBasicMCBuilder::BuildIt() checks this flag and returns false
if a non-zero value is detected.
llvm-svn: 101290
2010-04-14 21:03:13 +00:00
Jakob Stoklund Olesen
938f2ae310
Remove unneeded types from test.
...
llvm-svn: 101286
2010-04-14 20:56:09 +00:00
Evan Cheng
21b588b678
- Code clean up to reduce indentation.
...
- TryToOptimizeStoreOfMallocToGlobal should check if TargetData is available and bail out if it is not. The transformations being done requires TD.
llvm-svn: 101285
2010-04-14 20:52:55 +00:00
Dan Gohman
33c46fde07
Use FunTy instead of hard-coding Function.
...
llvm-svn: 101283
2010-04-14 20:49:44 +00:00
Bob Wilson
c05b887c84
Don't custom lower bit converts to ARM VMOVDRRD or VMOVDRR when the operand
...
does not have a legal type. The legalizer does not know how to handle those
nodes. Radar 7854640.
llvm-svn: 101282
2010-04-14 20:45:23 +00:00
Dan Gohman
7a633cd750
Oops, make these public.
...
llvm-svn: 101280
2010-04-14 20:31:28 +00:00
Dan Gohman
0ebddbe1d9
Move getType() and getCaller() into CallSiteBase so that
...
ImmutableCallSite can use them too.
llvm-svn: 101279
2010-04-14 20:28:44 +00:00
Evan Cheng
9e100384cb
Trim tests and convert to FileCheck.
...
llvm-svn: 101277
2010-04-14 20:22:17 +00:00
Dan Gohman
c87b74d913
Delete unneeeded arguments.
...
llvm-svn: 101276
2010-04-14 20:17:22 +00:00
Dan Gohman
a3918ecdf5
Delete unused arguments.
...
llvm-svn: 101275
2010-04-14 20:05:00 +00:00
Dan Gohman
7deb447781
Factor out EH landing pad code into a separate function, and constify
...
a bunch of stuff to support it.
llvm-svn: 101273
2010-04-14 19:53:31 +00:00
Dan Gohman
c2c08d19b8
Reset the debug location even if the instruction was a terminator.
...
llvm-svn: 101272
2010-04-14 19:30:02 +00:00
Dan Gohman
a0e9a7285e
Fix a missing #include.
...
llvm-svn: 101270
2010-04-14 18:57:18 +00:00
Dan Gohman
cacd4f2401
Refine #includes.
...
llvm-svn: 101269
2010-04-14 18:49:17 +00:00
Dan Gohman
d313a05a16
Split ISD::NodeType and a few related items out of SelectionDAGNodes.h
...
into a separate header to allow clients to use them without pulling in
SelectionDAG-specific declarations.
llvm-svn: 101268
2010-04-14 18:44:34 +00:00
Dan Gohman
8ebcbe949a
Pull utility routines with no SelectionDAG dependence out of
...
SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for
them to live, but it's better than SelectionDAGBuilder for now.
llvm-svn: 101267
2010-04-14 18:31:02 +00:00
Dan Gohman
f5cca35750
Fix typos in comments.
...
llvm-svn: 101266
2010-04-14 18:24:06 +00:00
Gabor Greif
fefdd42644
performance: cache the dereferenced use_iterator
...
llvm-svn: 101265
2010-04-14 18:13:29 +00:00
Dan Gohman
fea9ba18ff
Delete an obsolete comment.
...
llvm-svn: 101264
2010-04-14 17:40:25 +00:00
Dan Gohman
3215eae4a3
Delete an unused function.
...
llvm-svn: 101263
2010-04-14 17:22:02 +00:00
Dan Gohman
094fc7b09e
Clear the FunctionLoweringInfo object before doing other things that
...
don't need it.
llvm-svn: 101262
2010-04-14 17:13:16 +00:00
Dan Gohman
ad0b3ea3cc
Move this assert out of SelectionDAGISel into FunctionLoweringInfo, and
...
drop the redundant #ifndef NDEBUG.
llvm-svn: 101261
2010-04-14 17:11:23 +00:00
Dan Gohman
0f405c8d73
Add a comment.
...
llvm-svn: 101260
2010-04-14 17:09:37 +00:00
Dan Gohman
2ca8fb229c
Move the code for initialing the entry block livein set out of
...
SelectionDAGISel.
llvm-svn: 101258
2010-04-14 17:05:00 +00:00
Dan Gohman
4bfb437ec9
Reorgnaize this code to be more tidy and readable.
...
llvm-svn: 101256
2010-04-14 17:02:07 +00:00
Dan Gohman
1939b5f130
Trim #includes.
...
llvm-svn: 101255
2010-04-14 16:54:39 +00:00
Dan Gohman
2b79ee8bc8
Move the code for emitting livein copies out of SelectionDAGISel.
...
llvm-svn: 101254
2010-04-14 16:51:49 +00:00
Gabor Greif
c08e5df836
performance: cache the dereferenced use_iterator
...
llvm-svn: 101253
2010-04-14 16:48:56 +00:00
Dan Gohman
69e8e322d9
Sink landing-pad marking code out of
...
SelectionDAGISel::runOnMachineFunction into FunctionLowering.
llvm-svn: 101252
2010-04-14 16:32:56 +00:00
Dan Gohman
f57117d166
It's not necessary to recompute EB here.
...
llvm-svn: 101251
2010-04-14 16:30:40 +00:00
Gabor Greif
a49686fa3e
performance: cache the dereferenced use_iterator
...
llvm-svn: 101250
2010-04-14 16:13:56 +00:00
Dan Gohman
65de3d140d
Add a comment.
...
llvm-svn: 101248
2010-04-14 16:08:56 +00:00
Dan Gohman
4083e9afaf
Fix whitespace, comments.
...
llvm-svn: 101247
2010-04-14 15:59:02 +00:00
Dan Gohman
8a616ea9a9
Add explicit keywords.
...
llvm-svn: 101246
2010-04-14 15:50:02 +00:00
Dan Gohman
7947f03a07
Use C++, not C++-standard-library-internals-ese.
...
llvm-svn: 101245
2010-04-14 15:41:50 +00:00
Dan Gohman
f1f0c9ded8
Make SuccIterator's private parts private too.
...
llvm-svn: 101244
2010-04-14 15:38:15 +00:00
Dan Gohman
6177386b05
Make helper utility members private.
...
llvm-svn: 101243
2010-04-14 15:33:04 +00:00
Benjamin Kramer
a050255103
EDis: Don't include inttypes.h. We support compilers which don't provide it. It was unused anyways.
...
llvm-svn: 101241
2010-04-14 13:56:38 +00:00
Nick Lewycky
cc924c7483
Enable RTTI again. While this works fine for LLVM, it creates an ABI
...
incompatibility with some clients covered by the buildbots, such as llvm-gcc.
llvm-svn: 101237
2010-04-14 05:51:59 +00:00
Nick Lewycky
80ee5e299c
Don't forget cmake!
...
llvm-svn: 101234
2010-04-14 05:35:20 +00:00
Nick Lewycky
81f8f03dc9
Turn off RTTI for VMCore. Yay!
...
llvm-svn: 101233
2010-04-14 05:30:13 +00:00
Nick Lewycky
163a743b51
I don't know how, but I managed to goof the revert. Remove function that should
...
have been removed in r101231.
llvm-svn: 101232
2010-04-14 05:03:50 +00:00
Nick Lewycky
ca615eb0d6
Revert r101213.
...
llvm-svn: 101231
2010-04-14 04:51:58 +00:00
Nick Lewycky
c37b45bd2d
Remove accidentally committed cruft.
...
llvm-svn: 101230
2010-04-14 04:46:11 +00:00
Nick Lewycky
7cd1aa31ac
Fix 80 column ruler.
...
llvm-svn: 101229
2010-04-14 04:40:35 +00:00
Nick Lewycky
7c167954e2
Bugpoint no longer uses exceptions.
...
llvm-svn: 101228
2010-04-14 04:40:31 +00:00
Chris Lattner
6b55cb9cd8
implement mc asmparser support for '.', which gets the
...
current PC. rdar://7834775
We now produce an identical .o file compared to the cctools
assembler for something like this:
_f0:
L0:
jmp L1
.long . - L0
L1:
jmp A
.long . - L1
.zerofill __DATA,_bss,A,0
llvm-svn: 101227
2010-04-14 04:40:28 +00:00
Nick Lewycky
087d59cf25
Remove tab.
...
llvm-svn: 101223
2010-04-14 04:19:05 +00:00
Nick Lewycky
8408f33deb
Commit testcase for r101213.
...
llvm-svn: 101214
2010-04-14 03:46:42 +00:00
Nick Lewycky
3cdae269f0
While DAE can't modify the function signature of an externally visible function,
...
it can check whether the visible direct callers are passing in parameters to
dead arguments and replace those with undef.
This reinstates r94322 with bugs fixed.
llvm-svn: 101213
2010-04-14 03:38:11 +00:00
Dan Gohman
5f40d34958
Generalize this code to handle Instructions in addition to ConstantExprs.
...
llvm-svn: 101210
2010-04-14 02:33:23 +00:00
Dan Gohman
9162fb07be
Reorder the methods of this class to be a little more organized.
...
llvm-svn: 101206
2010-04-14 02:09:45 +00:00
Johnny Chen
48bbf4910e
Fixed another assert exposed by fuzzing. Now, when an encoding error occurs
...
involing getBFCInvMask() where lsb <= msb does not hold true, the disassembler
just returns false, instead of assert, to indicate disassembly error.
llvm-svn: 101205
2010-04-14 02:05:29 +00:00
Devang Patel
b7eadda495
Clear MachineInstr->MCSymbol maps at the end of a function.
...
llvm-svn: 101202
2010-04-14 01:18:28 +00:00
Johnny Chen
82c3cadad6
Fixed an assert() exposed by fuzzing. Now, instead of assert when an invalid
...
instruction encoding is encountered, we just return a NULL ARMBasicMCBuilder
instance and the client just returns false to indicate disassembly error.
llvm-svn: 101201
2010-04-14 01:17:37 +00:00
Daniel Dunbar
780792dc86
Fix -Asserts warnings.
...
llvm-svn: 101191
2010-04-13 23:34:11 +00:00
Devang Patel
c48b976c08
XFAIL this test for powerpc.
...
This test relies on iSel lowering dbg_declare intrinsic when CodeGen::OptLevel is None. On PPC side, CodeGen::OptLevel stays to default when -O0 is used on the command line.
llvm-svn: 101190
2010-04-13 23:23:09 +00:00
Douglas Gregor
9078f954bf
Unbreak CMake build by improving the EnhancedDisassembly makefile a
...
bit (we're not trying to build a shared library yet) and generating
the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary.
llvm-svn: 101188
2010-04-13 22:47:43 +00:00
Evan Cheng
87585d72a5
Fast path implicit_def check.
...
llvm-svn: 101183
2010-04-13 22:13:34 +00:00
Evan Cheng
6c35893aa6
Add test for post-ra machine licm.
...
llvm-svn: 101182
2010-04-13 22:10:03 +00:00
Bob Wilson
699bdf7adf
Handle a v2f64 formal parameter that is split between registers and memory
...
such that the entire second half is in memory. Radar 7855014.
llvm-svn: 101181
2010-04-13 22:03:22 +00:00
Sean Callanan
9b6772c43a
Quick fix for build errors caused by undefined
...
NULL.
llvm-svn: 101180
2010-04-13 21:36:35 +00:00
Sean Callanan
814e69b171
Fixed a nasty layering violation in the edis source
...
code. It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.
Also removed hacky #define-controlled initialization
of targets in edis. If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.
llvm-svn: 101179
2010-04-13 21:21:57 +00:00
Ted Kremenek
8af6f765f5
Add CMake support for 'edis'.
...
llvm-svn: 101177
2010-04-13 20:52:50 +00:00
Johnny Chen
44d7d183fa
Changed getSOImmValRotate()'s hunt retry logic to ignore the low order 6 bits,
...
instead of 7, because we are only looking for even rotate amount.
llvm-svn: 101172
2010-04-13 20:35:16 +00:00
Devang Patel
12d150ea43
Do not include types without any definition in pubtypes list.
...
llvm-svn: 101171
2010-04-13 20:35:04 +00:00
Evan Cheng
cce672c172
Avoid variable shadowing.
...
llvm-svn: 101170
2010-04-13 20:25:29 +00:00
Evan Cheng
89e74792b6
Expand postra machine licm's capability a little more. If an instruction's register operands are all loop invariants, then it's safe to hoist it.
...
llvm-svn: 101167
2010-04-13 20:21:05 +00:00
Jakob Stoklund Olesen
20b71e28cc
Teach MachineSinking to handle easy critical edges.
...
Sometimes it is desirable to sink instructions along a critical edge:
x = ...
if (a && b) ...
else use(x);
The 'a && b' condition creates a critical edge to the else block, but we still
want to sink the computation of x into the block. The else block is dominated by
the parent block, so we are not pushing instructions into new code paths.
llvm-svn: 101165
2010-04-13 19:06:14 +00:00
Evan Cheng
4d89dd8353
Fix test on non-x86 hosts.
...
llvm-svn: 101163
2010-04-13 18:54:04 +00:00
Evan Cheng
4ca4bc6f95
Re-apply 101075 and fix it properly. Just reuse the debug info of the branch instruction being optimized. There is no need to --I which can deref off start of the BB.
...
llvm-svn: 101162
2010-04-13 18:50:27 +00:00
Chris Lattner
6b2b064d7a
Make the disassembler respect the assembler dialect when printing instructions,
...
patch by Marius Wachtler!
llvm-svn: 101160
2010-04-13 18:41:17 +00:00
Eric Christopher
d67f66dc0c
Temporarily revert r101075, it's causing invalid iterator assertions
...
in a nightly tester.
llvm-svn: 101158
2010-04-13 18:37:58 +00:00
Evan Cheng
0a2aff2d12
Teach postra machine licm to hoist more obvious invariants, e.g. instructions with no source operands.
...
llvm-svn: 101154
2010-04-13 18:16:00 +00:00
Dan Gohman
8a2dae57e2
Add a few comments.
...
llvm-svn: 101148
2010-04-13 17:07:06 +00:00
Dan Gohman
9d2d053e11
Eliminate MachineBasicBlock::const_livein_iterator and make
...
MachineBasicBlock::livein_iterator a const_iterator, because
clients shouldn't ever be using the iterator interface to
mutate the livein set.
llvm-svn: 101147
2010-04-13 16:57:55 +00:00
Dan Gohman
dcacef3188
Rename MachineFrameInfo variables to MFI, for consistency with
...
the rest of CodeGen.
llvm-svn: 101146
2010-04-13 16:56:45 +00:00
Dan Gohman
6b1b1e4358
Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.
...
llvm-svn: 101145
2010-04-13 16:55:37 +00:00
Dan Gohman
a1cf9fef70
Use MachineBasicBlock::isLiveIn.
...
llvm-svn: 101144
2010-04-13 16:53:51 +00:00
Dan Gohman
39305067ad
Delete an unused member variable.
...
llvm-svn: 101143
2010-04-13 16:51:39 +00:00
Dan Gohman
7ef0dc2163
Teach ScalarEvolution to simplify smax and umax when it can prove
...
that one operand is always greater than another.
llvm-svn: 101142
2010-04-13 16:51:03 +00:00
Dan Gohman
fe4b29180b
Minor code micro-optimizations.
...
llvm-svn: 101141
2010-04-13 16:49:23 +00:00
Eric Christopher
4016dcd625
Actually... return after the check for invalid input.
...
llvm-svn: 101139
2010-04-13 16:41:29 +00:00
Benjamin Kramer
55cfaa37de
BumpPtrAllocator::Reset() doesn't need to allocate anything. (Thanks, Jakob)
...
llvm-svn: 101138
2010-04-13 16:38:06 +00:00
Benjamin Kramer
5d8eb779d5
Update unittest for allocator laziness.
...
llvm-svn: 101131
2010-04-13 15:01:26 +00:00
Benjamin Kramer
5b0650bf6e
Let BumpPtrAllocator lazily allocate the first slab.
...
We have some code in llvm and clang where a BumpPtrAllocator is declared in a
class but never used in the common case. Stop wasting memory there.
llvm-svn: 101130
2010-04-13 14:41:51 +00:00
Owen Anderson
b516f1c6cc
Remove SCCVN from the CMake build system.
...
llvm-svn: 101125
2010-04-13 08:33:09 +00:00
Chris Lattner
069711865f
checkpoint.
...
llvm-svn: 101118
2010-04-13 06:37:00 +00:00