Chris Lattner
eea0f58393
enhance NonLocalDepEntry to keep the per-block phi translated address
...
of the query.
llvm-svn: 90958
2009-12-09 07:31:04 +00:00
Daniel Dunbar
d333139411
DeltaAlgorithm: Add a virtual destructor and home.
...
llvm-svn: 90957
2009-12-09 07:19:48 +00:00
Chris Lattner
0c31547168
change NonLocalDepEntry from being a typedef for an std::pair to be its
...
own small class. No functionality change.
llvm-svn: 90956
2009-12-09 07:08:01 +00:00
Lang Hames
1ab2b49e6d
Added a new "splitting" spiller.
...
When a call is placed to spill an interval this spiller will first try to
break the interval up into its component values. Single value intervals and
intervals which have already been split (or are the result of previous splits)
are spilled by the default spiller.
Splitting intervals as described above may improve the performance of generated
code in some circumstances. This work is experimental however, and it still
miscompiles many benchmarks. It's not recommended for general use yet.
llvm-svn: 90951
2009-12-09 05:39:12 +00:00
Daniel Dunbar
5ea6200d06
Remove spurious extern.
...
llvm-svn: 90937
2009-12-09 03:26:33 +00:00
Daniel Dunbar
0d886ca091
Remove unneeded ';' and a class/struct mismatch (noticed by clang).
...
llvm-svn: 90934
2009-12-09 02:58:09 +00:00
Chris Lattner
10398e74ae
the code in GVN that tries to forward large loads to small
...
stores is not phi translating, thus it miscompiles really
crazy testcases. This is from inspection, I haven't seen
this in the wild.
llvm-svn: 90930
2009-12-09 02:43:05 +00:00
Chris Lattner
946b58dd90
add some aborts to #if 0's.
...
llvm-svn: 90929
2009-12-09 02:41:54 +00:00
Chris Lattner
972e6d8d00
Switch GVN and memdep to use PHITransAddr, which correctly handles
...
phi translation of complex expressions like &A[i+1]. This has the
following benefits:
1. The phi translation logic is all contained in its own class with
a strong interface and verification that it is self consistent.
2. The logic is more correct than before. Previously, if intermediate
expressions got PHI translated, we'd miss the update and scan for
the wrong pointers in predecessor blocks. @phi_trans2 is a testcase
for this.
3. We have a lot less code in memdep.
We can handle phi translation across blocks of things like @phi_trans3,
which is pretty insane :).
This patch should fix the miscompiles of 255.vortex, and I tested it
with a bootstrap of llvm-gcc, llvm-test and dejagnu of course.
llvm-svn: 90926
2009-12-09 01:59:31 +00:00
Evan Cheng
d938faff4b
Teach InferPtrAlignment to infer GV+cst alignment and use it to simplify x86 isl lowering code.
...
llvm-svn: 90925
2009-12-09 01:53:58 +00:00
Devang Patel
e52b1fa128
Remove tests that are not suitable anymore. Plus they are not testing the original bugfixes anymore. These tests were inserted to check bug fixes in code that handled debug info intrinsics. These intrinsics are no longer used and now llvm parser simply ignores old .dbg intrinsics from these dead tests.
...
llvm-svn: 90923
2009-12-09 01:46:00 +00:00
Evan Cheng
f5938d5d27
Move isConsecutiveLoad to SelectionDAG. It's not target dependent and it's primary used by selectdag passes.
...
llvm-svn: 90922
2009-12-09 01:36:00 +00:00
Chris Lattner
9af9d0f74e
fix a nasty variable that was shadowing the real CurBB but with the wrong value.
...
llvm-svn: 90920
2009-12-09 01:19:16 +00:00
Evan Cheng
2d412f0cb8
Infer alignment for non-fixed stack object.
...
llvm-svn: 90919
2009-12-09 01:17:24 +00:00
Evan Cheng
1750009f38
Add const qualifier.
...
llvm-svn: 90918
2009-12-09 01:10:37 +00:00
Evan Cheng
34a23ea371
Refactor InferAlignment out of DAGCombine.
...
llvm-svn: 90917
2009-12-09 01:04:59 +00:00
Chris Lattner
11da6b0050
fix many input tracking bugs.
...
llvm-svn: 90915
2009-12-09 00:56:14 +00:00
Chris Lattner
4b2a6e200f
when opt crashes, print its command line arguments as a pretty stack trace.
...
Somehow opt was missed when this was added.
llvm-svn: 90912
2009-12-09 00:41:28 +00:00
Dan Gohman
56a5f19c70
Fix a typo in a comment, and adjust SmallSet and SmallVector sizes,
...
that Chris noticed.
llvm-svn: 90910
2009-12-09 00:28:42 +00:00
Chris Lattner
37251f8375
fix PHI translation to take the PHI out of the instinputs set and add
...
the translated value back to it if an instruction.
llvm-svn: 90909
2009-12-09 00:18:13 +00:00
Chris Lattner
cfd76375e3
instructions defined in CurBB may be intermediate nodes of the computation.
...
llvm-svn: 90908
2009-12-09 00:10:55 +00:00
Chris Lattner
0aa75680d6
add dumping and sanity checking support.
...
llvm-svn: 90906
2009-12-09 00:01:00 +00:00
Dan Gohman
2d27b191d9
Put a threshold on the number of users PointerMayBeCaptured
...
examines; fall back to a conservative answer if there are
more. This works around some several compile time problems
resulting from BasicAliasAnalysis calling PointerMayBeCaptured.
The value has been chosen arbitrarily.
This fixes rdar://7438917 and may partially address PR5708.
llvm-svn: 90905
2009-12-08 23:59:12 +00:00
Chris Lattner
5cf4b74b45
make sure that PHITransAddr keeps its 'InstInputs' list up to
...
date when instsimplify kicks in.
llvm-svn: 90901
2009-12-08 23:42:51 +00:00
Devang Patel
512001ac7d
Revert 90858 90875 and 90805 for now.
...
llvm-svn: 90898
2009-12-08 23:21:45 +00:00
Evan Cheng
0c2544fd6b
- Support inline asm 'w' constraint for 128-bit vector types.
...
- Also support the 'q' NEON registers asm code.
llvm-svn: 90894
2009-12-08 23:06:22 +00:00
Daniel Dunbar
564c96bd5e
lit: Prevent crash-on-invalid (when run on directory which has no test suite).
...
llvm-svn: 90871
2009-12-08 19:49:30 +00:00
Daniel Dunbar
0f620b81c1
CMake/lit: Add llvm_{unit_,}site_config parameters, and always pass them when running tests from the project files.
...
llvm-svn: 90869
2009-12-08 19:47:36 +00:00
Evan Cheng
dc3e58eb89
Revert 90789 for now. It caused massive compile time regression. Post-ra scheduler slowed down dramatically with this.
...
llvm-svn: 90868
2009-12-08 19:34:53 +00:00
Bob Wilson
c5d082fd5d
Some superficial cleanups.
...
llvm-svn: 90866
2009-12-08 18:27:03 +00:00
Bob Wilson
2029ea04f9
Clean up dead operands left around after SROA replaces a mem intrinsic.
...
I'm not aware that this does anything significant on its own, but it's
needed for another patch that I'm working on.
llvm-svn: 90864
2009-12-08 18:22:03 +00:00
Devang Patel
24c0bb1ca1
Cleanup.
...
There is no need to supply ModuleCU to addType() as a parameter.
llvm-svn: 90858
2009-12-08 15:31:31 +00:00
Devang Patel
7d723ec70d
Do not try to push dead variable's debug info into namespace info.
...
llvm-svn: 90857
2009-12-08 15:01:35 +00:00
Benjamin Kramer
dfcc285902
Remove useless calls to c_str().
...
llvm-svn: 90855
2009-12-08 13:07:38 +00:00
Duncan Sands
6a3df7b0c7
Teach GlobalOpt to delete aliases with internal linkage (after
...
forwarding any uses). GlobalDCE can also do this, but is only
run at -O3.
llvm-svn: 90850
2009-12-08 10:10:20 +00:00
Chris Lattner
6425a23c8c
fix a typo (and -> add) and fix GetAvailablePHITranslatedSubExpr to not
...
side-effect the current object.
llvm-svn: 90837
2009-12-08 06:06:26 +00:00
Nick Lewycky
8bca014d7f
Remove unnecessary #include "llvm/LLVMContext.h".
...
llvm-svn: 90836
2009-12-08 05:45:41 +00:00
Chris Lattner
ff09559a8f
whitespace cleanup
...
llvm-svn: 90834
2009-12-08 05:31:46 +00:00
Oscar Fuentes
a929407244
Removed VC++ compatibility code from DataTypes.h.in.
...
This header file is not used on VC++ builds.
llvm-svn: 90829
2009-12-08 02:49:54 +00:00
Oscar Fuentes
15c4bc673a
For VC++, define the ?INT*_C macros only it they are not yet defined.
...
Some compatibility updates like the Boost TR1 compatibility headers
define them.
Patch contributed by OvermindDL1!
llvm-svn: 90828
2009-12-08 02:40:09 +00:00
Anton Korobeynikov
dd2b2f8cba
Reduce (cmp 0, and_su (foo, bar)) into (bit foo, bar). This saves extra instruction. Patch inspired by Brian Lucas!
...
llvm-svn: 90819
2009-12-08 01:03:04 +00:00
Evan Cheng
fb1654d467
Watch out for duplicated PHI instructions.
...
llvm-svn: 90816
2009-12-07 23:11:03 +00:00
Evan Cheng
5c668a2259
Follow up to 90488. Turn a check into an assertion.
...
llvm-svn: 90815
2009-12-07 23:10:34 +00:00
Jeffrey Yasskin
fc7384d366
Fix the OProfileJITEventListener for StringRef being returned from debug info.
...
llvm-svn: 90813
2009-12-07 22:32:38 +00:00
Victor Hernandez
58fd941eab
Rename DIFactory::InsertValue() as DIFactory::InsertDbgValueIntrinsic()
...
llvm-svn: 90807
2009-12-07 21:54:43 +00:00
Devang Patel
b074d1783b
Add support to emit debug info for c++ style namespaces.
...
llvm-svn: 90805
2009-12-07 21:41:32 +00:00
Evan Cheng
d9cb324d7c
Delete code accidentally left behind.
...
llvm-svn: 90804
2009-12-07 21:19:33 +00:00
Chris Lattner
9e34d156d3
fix typo
...
llvm-svn: 90793
2009-12-07 19:52:57 +00:00
Chris Lattner
dccf7ad8b9
add accessor, improve comment.
...
llvm-svn: 90792
2009-12-07 19:45:30 +00:00
Evan Cheng
8d61ec3002
Test case for 90787.
...
llvm-svn: 90791
2009-12-07 19:42:22 +00:00
David Greene
76a7edc36d
Use FileCheck and set nounwind on calls.
...
llvm-svn: 90790
2009-12-07 19:40:26 +00:00
Dan Gohman
6aaf4232e5
Apply Pekka Jääskeläinen's patch to raise the first virtual register
...
number in order to accomodate targets with more than 1024 registers.
llvm-svn: 90789
2009-12-07 19:38:26 +00:00
Victor Hernandez
fb7c680b61
Introduce the "@llvm.dbg.value" debug intrinsic.
...
The semantics of llvm.dbg.value are that starting from where it is executed, an offset into the specified user source variable is specified to get a new value.
An example:
call void @llvm.dbg.value(metadata !{ i32 7 }, i64 0, metadata !2 )
Here the user source variable associated with metadata #2 gets the value "i32 7" at offset 0.
llvm-svn: 90788
2009-12-07 19:36:34 +00:00
Mikhail Glushenkov
57a67facb8
Simplify a bit.
...
llvm-svn: 90785
2009-12-07 19:16:13 +00:00
Mikhail Glushenkov
fca845187d
Throw 'const char*' instead of 'std::string'.
...
llvm-svn: 90784
2009-12-07 19:15:57 +00:00
Chris Lattner
77b0d3b217
add support for phi translation and incorpation of new expression.
...
llvm-svn: 90782
2009-12-07 19:04:49 +00:00
Dan Gohman
9528ccdd77
Don't enable the post-RA scheduler on x86 except at -O3. In its
...
current form, it is too expensive in compile time.
llvm-svn: 90781
2009-12-07 19:04:31 +00:00
Chris Lattner
e60244db8c
checkpoint of the new PHITransAddr code, still not done and not used by
...
anything.
llvm-svn: 90779
2009-12-07 18:36:53 +00:00
Mikhail Glushenkov
0bdfb53080
Regenerate.
...
llvm-svn: 90776
2009-12-07 18:26:24 +00:00
Mikhail Glushenkov
550694d18a
Documentation update.
...
llvm-svn: 90775
2009-12-07 18:26:11 +00:00
Mikhail Glushenkov
67c106664b
Deprecate 'unpack_values'.
...
Use 'forward_values' + 'comma_separated' instead.
llvm-svn: 90774
2009-12-07 18:25:54 +00:00
Mikhail Glushenkov
e69994f04f
Pass '-msse' and friends to llc as '-mattr=+/-'.
...
llvm-svn: 90771
2009-12-07 17:03:21 +00:00
Mikhail Glushenkov
6b6be99632
Implement 'forward_value' and 'forward_transformed_value'.
...
llvm-svn: 90770
2009-12-07 17:03:05 +00:00
Mikhail Glushenkov
d5774dfb8d
Refactoring, no functionality change.
...
llvm-svn: 90764
2009-12-07 10:51:55 +00:00
Evan Cheng
cc77062194
Pre-regalloc tale duplication. Work in progress.
...
llvm-svn: 90759
2009-12-07 10:15:19 +00:00
John Mosby
7bc9bb3555
fixed some typos in method comments, reworded some comments for clarity
...
llvm-svn: 90754
2009-12-07 09:06:37 +00:00
Oscar Fuentes
8b6d88d2f8
Fixes the Atomic implementation if compiled by MSVC compiler.
...
sys::cas_flag should be long on this platform, InterlockedAdd() is
defined only for the Itanium architecture (according to MSDN).
Patch by Michael Beck!
llvm-svn: 90748
2009-12-07 05:29:59 +00:00
Evan Cheng
92c310cb79
If BB is empty, insert PHI before end() instead of front().
...
llvm-svn: 90744
2009-12-07 03:07:01 +00:00
Anton Korobeynikov
24a6316aaa
Some pretty-printing
...
llvm-svn: 90742
2009-12-07 02:28:41 +00:00
Anton Korobeynikov
1bcece70bd
Truncate the arguments of llvm.frameaddress / llvm.returnaddress intrinsics from i32 to platform's largest native type
...
llvm-svn: 90741
2009-12-07 02:28:26 +00:00
Anton Korobeynikov
ff4ab51400
Add lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)
...
llvm-svn: 90740
2009-12-07 02:28:10 +00:00
Anton Korobeynikov
b4be8ce537
Initial codegen support for MSP430 ISRs
...
llvm-svn: 90739
2009-12-07 02:27:53 +00:00
Anton Korobeynikov
27a0ecfa39
Add MSP430 interrupt calling conv. No functionality change yet.
...
llvm-svn: 90738
2009-12-07 02:27:35 +00:00
Anton Korobeynikov
28d3c733aa
Add ability to select hw multiplier mode and select appropriate libcalls.
...
llvm-svn: 90737
2009-12-07 02:27:08 +00:00
Rafael Espindola
662908cdcf
Fix typos. Thanks to John Tytgat for noticing it!
...
llvm-svn: 90728
2009-12-07 00:27:35 +00:00
Anton Korobeynikov
75dfed4fa5
Dynamic stack realignment use of sp register as source/dest register
...
in "bic sp, sp, #15" leads to unpredicatble behaviour in Thumb2 mode.
Emit the following code instead:
mov r4, sp
bic r4, r4, #15
mov sp, r4
llvm-svn: 90724
2009-12-06 22:39:50 +00:00
Chris Lattner
6d6f10fe91
fix PR5698
...
llvm-svn: 90708
2009-12-06 17:17:23 +00:00
Chris Lattner
7a141b3d88
remove extraneous comma clang warns about
...
llvm-svn: 90707
2009-12-06 16:58:41 +00:00
Chris Lattner
778cb92235
constant fold loads from memcpy's from global constants. This is important
...
because clang lowers nontrivial automatic struct/array inits to memcpy from
a global array.
llvm-svn: 90698
2009-12-06 05:29:56 +00:00
Chris Lattner
93236ba327
add support for forwarding mem intrinsic values to non-local loads.
...
llvm-svn: 90697
2009-12-06 04:54:31 +00:00
Chris Lattner
850a3cd905
gvn is optimizing this better now.
...
llvm-svn: 90696
2009-12-06 04:16:05 +00:00
Chris Lattner
42376066eb
Handle forwarding local memsets to loads. For example, we optimize this:
...
short x(short *A) {
memset(A, 1, sizeof(*A)*100);
return A[42];
}
to 'return 257' instead of doing the load.
llvm-svn: 90695
2009-12-06 01:57:02 +00:00
Chris Lattner
d15e11ad98
Add helper methods for forming shift operations with a constant
...
shift amount.
llvm-svn: 90694
2009-12-06 01:56:22 +00:00
Chris Lattner
eb5bb1bf78
merge two tests.
...
llvm-svn: 90691
2009-12-06 01:47:24 +00:00
Oscar Fuentes
58eea20f47
CheckAtomic.cmake: Put all C++ code inside CHECK_CXX_SOURCE_COMPILES.
...
llvm-svn: 90685
2009-12-06 00:06:33 +00:00
Oscar Fuentes
4f6d1eb3e0
Fix for atomic intrinsics detection when using MSVC.
...
Patch by Michael Beck!
llvm-svn: 90683
2009-12-05 23:19:33 +00:00
Dan Gohman
35f5646ef0
Remove old DBG_LABEL code.
...
llvm-svn: 90669
2009-12-05 17:56:26 +00:00
Dan Gohman
6e7073b846
Remove the unused DisableLegalizeTypes option and related code.
...
llvm-svn: 90668
2009-12-05 17:51:33 +00:00
Bill Wendling
29d6390249
Calling InvalidateEntry during the refinement was breaking the bootstrap.
...
llvm-svn: 90656
2009-12-05 07:59:04 +00:00
Bill Wendling
fa3f115ec4
Final cleanups:
...
- Privatize a typedef.
- Call the InvalidateEntry when refining a type.
llvm-svn: 90655
2009-12-05 07:46:49 +00:00
Bill Wendling
f89986235d
Temporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.
...
llvm-svn: 90653
2009-12-05 07:30:23 +00:00
Nick Lewycky
c86b6fbb40
Document that memory use intrinsics may also return Def results.
...
llvm-svn: 90651
2009-12-05 06:37:52 +00:00
Nick Lewycky
e91765fdbb
Fix indentation in switch statement.
...
llvm-svn: 90650
2009-12-05 06:37:24 +00:00
Nick Lewycky
a0e9d700dc
Generalize this optimization to work on equality comparisons between any two
...
integers that are constant except for a single bit (the same n-th bit in each).
llvm-svn: 90646
2009-12-05 05:00:00 +00:00
Eric Christopher
455c5776e2
More updates to objectsize intrinsic docs.
...
llvm-svn: 90644
2009-12-05 02:46:03 +00:00
Dan Gohman
0891d759b5
Don't print a space before the : between the file name and line number.
...
And separate the directory and file name with a '/'.
llvm-svn: 90641
2009-12-05 02:00:34 +00:00
Bill Wendling
4968774280
Inline methods which are called only once.
...
llvm-svn: 90640
2009-12-05 01:46:01 +00:00
Bill Wendling
da95e13750
Refactor some code. No functionality change.
...
llvm-svn: 90639
2009-12-05 01:43:33 +00:00
Dan Gohman
3a6164e8ab
Print newlines after printing labels for debug info, so that the output
...
isn't cluttered with things like "Llabel47:Llabel48: movq (%rsi), %xmm3"
llvm-svn: 90638
2009-12-05 01:42:34 +00:00
Dan Gohman
c82272a7b6
Don't blindly set the debug location for PHI node copies.
...
llvm-svn: 90637
2009-12-05 01:29:04 +00:00
Dan Gohman
18f94469dc
Make TargetSelectInstruction protected and called from FastISel.cpp
...
instead of SelectionDAGISel.cpp.
llvm-svn: 90636
2009-12-05 01:27:58 +00:00
Dan Gohman
047a767d74
Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
...
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.
llvm-svn: 90634
2009-12-05 00:44:40 +00:00
Dan Gohman
0b44cb0d78
Simplify this code: don't call AnalyzeBranch before doing simpler checks.
...
llvm-svn: 90633
2009-12-05 00:32:59 +00:00
Dan Gohman
02578a3805
The debug information for an LLVM Instruction applies to that Instruction
...
and that Instruction only. Implement this by setting the "current debug position"
back to Unknown after processing each instruction.
llvm-svn: 90632
2009-12-05 00:27:08 +00:00
Dan Gohman
abc77742c8
Fix this code to use DIScope instead of DICompileUnit, as in r90181.
...
Don't print "SrcLine"; just print the filename and line number, which
is obvious enough and more informative.
llvm-svn: 90631
2009-12-05 00:23:29 +00:00
Dan Gohman
33004b6302
Don't print the debug directory; it's often long and uninteresting. Omit
...
the column number if it is not known. Handle the case of a missing filename
better.
llvm-svn: 90630
2009-12-05 00:20:51 +00:00
Dan Gohman
e79368d3ff
Minor code simplification.
...
llvm-svn: 90628
2009-12-05 00:05:43 +00:00
David Greene
f96c416900
Remove an unneeded include.
...
llvm-svn: 90627
2009-12-05 00:03:24 +00:00
Dan Gohman
6aea8dccf1
Remove now-redundant llvm-as invocations.
...
llvm-svn: 90626
2009-12-05 00:02:37 +00:00
David Greene
86bafa29a3
Remove an unneeded include.
...
llvm-svn: 90625
2009-12-04 23:55:07 +00:00
Bill Wendling
f85dc3f0f1
Add testcase for PR4262.
...
llvm-svn: 90623
2009-12-04 23:29:57 +00:00
Dan Gohman
e6d5445dc1
Print a space between the comment character and the text.
...
llvm-svn: 90621
2009-12-04 23:19:55 +00:00
Bill Wendling
74356efae9
Temporarily revert r72620 because r72619 was reverted.
...
llvm-svn: 90619
2009-12-04 23:16:56 +00:00
Devang Patel
8f0460278c
In TAG_subrange_type, uppder bound is zero indexed.
...
llvm-svn: 90617
2009-12-04 23:10:24 +00:00
David Greene
c5f3d8e343
Fix a bad merge.
...
llvm-svn: 90616
2009-12-04 23:08:02 +00:00
David Greene
e373c9a71a
Update the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
...
can return a MachineMemOperand.
llvm-svn: 90615
2009-12-04 23:00:50 +00:00
Bob Wilson
9e2792690b
Fix indentation.
...
llvm-svn: 90613
2009-12-04 22:46:47 +00:00
David Greene
15f9df5f4b
Use new interfaces to print spill size.
...
llvm-svn: 90611
2009-12-04 22:46:04 +00:00
David Greene
0508e435c3
Have hasLoad/StoreFrom/ToStackSlot return the relevant MachineMemOperand.
...
llvm-svn: 90608
2009-12-04 22:38:46 +00:00
Bob Wilson
050b812fe7
Fix up some comments.
...
llvm-svn: 90603
2009-12-04 21:57:37 +00:00
Bob Wilson
5ca37b274c
Fix 80-column violations.
...
llvm-svn: 90601
2009-12-04 21:51:35 +00:00
Daniel Dunbar
eebf029d1d
OptParser: Emit HelpText field for option groups.
...
llvm-svn: 90599
2009-12-04 21:41:24 +00:00
Bill Wendling
4ea0d2b8ee
Some code cleanup. No functionality change.
...
llvm-svn: 90588
2009-12-04 21:03:02 +00:00
Victor Hernandez
4d633542f2
Avoid creating a metadata slot for all metadata that contains an instruction
...
llvm-svn: 90581
2009-12-04 20:07:10 +00:00
Evan Cheng
9e67255748
Handle recursive PHI's.
...
llvm-svn: 90575
2009-12-04 19:09:10 +00:00
Victor Hernandez
a6bd3f5f5e
Fix crasher when N->getElement(n) is NULL
...
llvm-svn: 90572
2009-12-04 18:29:23 +00:00
Evan Cheng
6154dbd5ee
Add a pre-regalloc tail duplication pass.
...
llvm-svn: 90567
2009-12-04 09:42:45 +00:00
Evan Cheng
0f1cc35c65
Don't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.
...
llvm-svn: 90566
2009-12-04 09:23:37 +00:00
Duncan Sands
1602277b70
Add note about a subtle bug in this code. Does not effect the main
...
architectures that LLVM targets, because they don't use this code.
llvm-svn: 90564
2009-12-04 08:42:17 +00:00
Daniel Dunbar
c5b2ac4d97
Fix typo and add missing include.
...
llvm-svn: 90557
2009-12-04 08:17:07 +00:00
Andreas Neustifter
4665141ebd
Added debug output for inherited passes that are invalidated.
...
llvm-svn: 90553
2009-12-04 06:58:24 +00:00
Mikhail Glushenkov
c563ce3e62
Forward -m32/-m64 to the linker.
...
llvm-svn: 90548
2009-12-04 06:38:45 +00:00
Mikhail Glushenkov
2b86846b65
Support -march/-mtune/-mcpu.
...
llvm-svn: 90547
2009-12-04 06:38:28 +00:00
Chris Lattner
1ddfd9f96c
Fix PR5551 by not ignoring the top level constantexpr when
...
folding a load from constant.
llvm-svn: 90545
2009-12-04 06:29:29 +00:00
Chris Lattner
6d947a0774
add to cmake
...
llvm-svn: 90539
2009-12-04 04:15:36 +00:00
Chris Lattner
1c21aaca06
Small and carefully crafted testcase showing a miscompilation by GVN
...
that I'm working on. This is manifesting as a miscompile of 255.vortex
on some targets. No check lines yet because it fails.
llvm-svn: 90520
2009-12-04 02:12:12 +00:00
Chris Lattner
b63051caf6
add the start of a class used to handle phi translation in memdep and
...
gvn (this is just a skeleton so far). This will ultimately be used
to fix a nasty miscompilation with GVN.
llvm-svn: 90518
2009-12-04 02:10:16 +00:00
Mike Stump
94d3e9b094
Create yet another helper for Invoke.
...
llvm-svn: 90514
2009-12-04 01:53:15 +00:00
Victor Hernandez
b7176a13a4
Teach AsmWriter to write inline (not via a global metadata slot) metadata that contains an instruction
...
llvm-svn: 90512
2009-12-04 01:35:02 +00:00
Bob Wilson
2107eb70d9
Fix a comment typo.
...
llvm-svn: 90511
2009-12-04 01:33:04 +00:00
Mike Stump
bcb77c985b
Add some helpers for Invoke to mirror CreateCall helpers.
...
llvm-svn: 90508
2009-12-04 01:26:26 +00:00
Chris Lattner
2bd9609992
add an assert to make it really clear what this is doing. Return singularval as
...
a compile time perf optimization to avoid a load.
llvm-svn: 90507
2009-12-04 01:03:32 +00:00
Jakob Stoklund Olesen
ca9cf65455
Also attempt trivial coalescing for live intervals that end in a copy.
...
The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.
The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.
This patch takes care of a few more cases that r90163 missed.
llvm-svn: 90502
2009-12-04 00:16:04 +00:00
Evan Cheng
e156f611ab
- If the reaching definition is an undef and the use is a PHI, add the implicit_def to the end of the source block.
...
- When reaching value is replaced with another, update the cache as well.
llvm-svn: 90501
2009-12-04 00:09:05 +00:00
Devang Patel
3b666fef67
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
...
llvm-svn: 90498
2009-12-03 23:46:57 +00:00
Victor Hernandez
fa23223d4a
Add ParseInlineMetadata() which can parses metadata that refers to an instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata
...
llvm-svn: 90497
2009-12-03 23:40:58 +00:00
Jim Grosbach
5f9f721e95
remove out of date FIXME.
...
llvm-svn: 90490
2009-12-03 21:55:01 +00:00
Evan Cheng
b2c1529d8f
Handle undef values properly.
...
llvm-svn: 90489
2009-12-03 21:51:55 +00:00
Evan Cheng
8a19371370
Watch out for PHI instruction with no source operands.
...
llvm-svn: 90488
2009-12-03 21:50:58 +00:00
Bob Wilson
53bdae3802
Fix a comment typo.
...
llvm-svn: 90487
2009-12-03 21:47:07 +00:00
Duncan Sands
bbd6b6ddf4
Fix ExpandShiftWithUnknownAmountBit, which was completely bogus.
...
Pointed out by Javier Martinez (who also provided a patch). Since
this logic is not used on (for example) x86, I guess nobody noticed.
Tested by generating SHL, SRL, SRA on various choices of i64 for all
possible shift amounts, and comparing with gcc. Since I did this on
x86-32, I had to force the use of ExpandShiftWithUnknownAmountBit.
What I'm saying here is that I don't have a testcase I can add to the
repository.
llvm-svn: 90482
2009-12-03 21:37:32 +00:00
Jakob Stoklund Olesen
18c7cbd99b
Clean up some loop logic.
...
llvm-svn: 90481
2009-12-03 20:49:10 +00:00
Devang Patel
eb57c59b66
Add support to emit debug info for virtual functions and virtual base classes.
...
llvm-svn: 90474
2009-12-03 19:11:07 +00:00
Dan Gohman
083f229ba2
Print a newline after the Args: line so that unrelated errs() output doesn't
...
end up on the same line.
llvm-svn: 90473
2009-12-03 19:03:18 +00:00
Benjamin Kramer
daea8420e9
Fix MSVC build.
...
llvm-svn: 90454
2009-12-03 13:23:03 +00:00
Andreas Neustifter
506891de63
Convert ProfileVerifier to template so it can be used for different types of ProfileInfo.
...
llvm-svn: 90451
2009-12-03 12:55:57 +00:00
Andreas Neustifter
7dd85bfdff
Do not create negative edge weights in ProfileEstimator.
...
Use integer values for weights to prevent rounding errors.
Make ProfileEstimator more robust in general CFGs.
llvm-svn: 90449
2009-12-03 12:41:14 +00:00
Daniel Dunbar
ff53d4694c
Add an implementation of the delta debugging algorithm.
...
- This is a pretty slow / memory intensive implementation, and I will likely
change it to an iterative model, but it works.
llvm-svn: 90447
2009-12-03 11:12:42 +00:00
Andreas Neustifter
b87d0f0662
Use ProfileInfo-API in ProfileInfo Loader and do more assertions.
...
llvm-svn: 90446
2009-12-03 11:00:37 +00:00
Andreas Neustifter
312288b30c
Converted ProfileInfo to template, added more API for ProfileInfo-preserving.
...
llvm-svn: 90445
2009-12-03 09:30:12 +00:00
Evan Cheng
1bbe6be037
Teach tail duplication to update SSA form. Work in progress.
...
llvm-svn: 90432
2009-12-03 08:43:53 +00:00
Chris Lattner
f05330a5c8
expand note.
...
llvm-svn: 90429
2009-12-03 07:43:46 +00:00
Chris Lattner
d1e4ee3c2b
add a note
...
llvm-svn: 90428
2009-12-03 07:41:54 +00:00
Nate Begeman
9655f84662
Don't pull vector sext through both hands of a logical operation, since doing so prevents the fusion of vector sext and setcc into vsetcc.
...
Add a testcase for the above transformation.
Fix a bogus use of APInt noticed while tracking this down.
llvm-svn: 90423
2009-12-03 07:11:29 +00:00
Chris Lattner
c831fac043
fix a build problem with VC++, PR5664, patch by Alp Toker!
...
llvm-svn: 90419
2009-12-03 06:58:32 +00:00
Bob Wilson
0bbd3077ce
Recognize canonical forms of vector shuffles where the same vector is used for
...
both source operands. In the canonical form, the 2nd operand is changed to an
undef and the shuffle mask is adjusted to only reference elements from the 1st
operand. Radar 7434842.
llvm-svn: 90417
2009-12-03 06:40:55 +00:00
Jakob Stoklund Olesen
32042f9475
Don't call getValueType() on a null SDValue
...
llvm-svn: 90415
2009-12-03 05:15:35 +00:00
Owen Anderson
0b6e260066
Fix this crasher, and add a FIXME for a missed optimization.
...
llvm-svn: 90408
2009-12-03 03:43:29 +00:00
Evan Cheng
7145382389
Fill out codegen SSA updater. It's not yet tested.
...
llvm-svn: 90395
2009-12-03 02:31:43 +00:00
Bill Wendling
aba7d48764
Revert r90371. It was causing build failures.
...
llvm-svn: 90383
2009-12-03 01:54:07 +00:00
Jakob Stoklund Olesen
8392456f1b
Don't hang on to pointers or references after vector::push_back.
...
The MO reference to a MachineOperand can be invalidated by
MachineInstr::addOperand. Don't even use it for debugging.
llvm-svn: 90381
2009-12-03 01:49:56 +00:00
Chris Lattner
65812b58f2
add a failing testcase.
...
llvm-svn: 90380
2009-12-03 01:46:18 +00:00
Devang Patel
236526dd18
Emit method definition DIE at module level (even for methods with inlined functino body at soure level) so that the debugger can invoke it. This fixes many test failures in gdb test suite.
...
llvm-svn: 90375
2009-12-03 01:25:38 +00:00
Bill Wendling
693969eb35
Further improvements: refactoring code that does the same thing into one
...
function, converting "dyn_cast" to "cast", asserting the correct things, and
other general cleanups.
llvm-svn: 90371
2009-12-03 01:15:46 +00:00
Chris Lattner
765ac33a1a
yay for case insensitive file systems (?)
...
llvm-svn: 90370
2009-12-03 01:10:05 +00:00
Chris Lattner
77c36d68f3
fix PR5673 by being more careful about pointers to functions.
...
llvm-svn: 90369
2009-12-03 01:05:45 +00:00
Chris Lattner
73570673de
remove some dead std::ostream using code.
...
llvm-svn: 90366
2009-12-03 00:55:04 +00:00
Chris Lattner
a48f44d9ee
improve portability to avoid conflicting with std::next in c++'0x.
...
Patch by Howard Hinnant!
llvm-svn: 90365
2009-12-03 00:50:42 +00:00
Bill Wendling
1ed59c63e3
This initial code is meant to convert TargetData to use an AbstractTypesUser so
...
that it doesn't have dangling pointers when abstract types are resolved. This
modifies it somewhat to address comments: making the "StructLayoutMap" an
anonymous structure, calling "removeAbstractTypeUser" when appropriate, and
adding asserts where helpful.
llvm-svn: 90362
2009-12-03 00:17:12 +00:00
Douglas Gregor
a3b825edd1
Fix CMake makefiles
...
llvm-svn: 90354
2009-12-02 22:19:31 +00:00
Evan Cheng
20e9d030c9
Skeleton for MachineInstr level SSA updater.
...
llvm-svn: 90353
2009-12-02 22:02:52 +00:00
Bill Wendling
76bf386af0
Remove unnecessary check.
...
llvm-svn: 90352
2009-12-02 22:02:20 +00:00
Jim Grosbach
51663f7165
Add MaxStackAlignment.cpp to CMake
...
llvm-svn: 90337
2009-12-02 19:31:07 +00:00
Jim Grosbach
2c3a6c6589
Factor the stack alignment calculations out into a target independent pass.
...
No functionality change.
llvm-svn: 90336
2009-12-02 19:30:24 +00:00
Bob Wilson
fffbc0c5d9
Don't count PHI instructions toward the limit for tail duplicating a block.
...
llvm-svn: 90326
2009-12-02 17:15:24 +00:00
Jim Grosbach
d831ef4945
Move EliminateDuplicatePHINodes() from SimplifyCFG.cpp to Local.cpp
...
llvm-svn: 90324
2009-12-02 17:06:45 +00:00
Andreas Neustifter
3d207290fe
Cheap, mostly strict, stable sorting.
...
This is necessary for tests so the results are comparable.
llvm-svn: 90320
2009-12-02 15:57:15 +00:00
Benjamin Kramer
eee88bc5d2
Silence compiler warnings.
...
llvm-svn: 90319
2009-12-02 15:33:44 +00:00
Devang Patel
8c33959df2
Clarify that DIEString does not keep a copy of the string.
...
llvm-svn: 90318
2009-12-02 15:25:16 +00:00
Owen Anderson
b9878ee6b6
Cleanup/remove some parts of the lifetime region handling code in memdep and GVN,
...
per Chris' comments. Adjust testcases to match.
llvm-svn: 90304
2009-12-02 07:35:19 +00:00
Chris Lattner
c468025ac9
factor some code better.
...
llvm-svn: 90299
2009-12-02 06:44:58 +00:00
Chris Lattner
2764b4dc55
formatting cleanups.
...
llvm-svn: 90298
2009-12-02 06:35:55 +00:00
Chris Lattner
eea42c7b51
tidy up, remove dependence on order of evaluation of function args from EmitMemCpy.
...
llvm-svn: 90297
2009-12-02 06:05:42 +00:00
Chris Lattner
4ca1981e82
merge sext-2 into sext.ll
...
llvm-svn: 90293
2009-12-02 05:34:35 +00:00
Chris Lattner
0a12a8f9fe
rename test
...
llvm-svn: 90292
2009-12-02 05:32:33 +00:00
Chris Lattner
fe206d2a13
filecheckize
...
llvm-svn: 90291
2009-12-02 05:32:16 +00:00
Mon P Wang
bb3eac9e7a
Fixed an assertion failure for tracking sext of a vector of integers
...
llvm-svn: 90290
2009-12-02 04:59:58 +00:00
Devang Patel
a5749bda2c
Add utility routine to create subprogram definition entry from subprogram declaration entry.
...
llvm-svn: 90282
2009-12-01 23:09:02 +00:00
Devang Patel
a605b9124a
Reuse existing subprogram DIE.
...
llvm-svn: 90281
2009-12-01 23:07:59 +00:00
Chris Lattner
0e3b78a6c2
return more useful error messages by using strerror to format errno
...
instead of returning an ambiguous reason.
llvm-svn: 90275
2009-12-01 22:51:41 +00:00
Eric Christopher
8aa46bc6fd
Update per Bill's comments. Work in progress.
...
llvm-svn: 90271
2009-12-01 22:28:41 +00:00
Evan Cheng
732351f732
Fix PR5391: support early clobber physical register def tied with a use (ewwww)
...
- A valno should be set HasRedefByEC if there is an early clobber def in the middle of its live ranges. It should not be set if the def of the valno is defined by an early clobber.
- If a physical register def is tied to an use and it's an early clobber, it just means the HasRedefByEC is set since it's still one continuous live range.
- Add a couple of missing checks for HasRedefByEC in the coalescer. In general, it should not coalesce a vr with a physical register if the physical register has a early clobber def somewhere. This is overly conservative but that's the price for using such a nasty inline asm "feature".
llvm-svn: 90269
2009-12-01 22:25:00 +00:00
Jim Grosbach
8a8ba87ac8
test case for IV-Users simplification loop improvement
...
llvm-svn: 90260
2009-12-01 21:53:51 +00:00
Chris Lattner
e914c0eaa0
rename some variables.
...
llvm-svn: 90258
2009-12-01 21:16:01 +00:00
Chris Lattner
506b858c45
tidy
...
llvm-svn: 90257
2009-12-01 21:15:15 +00:00
Dan Gohman
b2ae02979f
Add edge source labels to SelectionDAG graphs, now that the graph printing
...
framework omits differentiated edge sources in the case where the labels
are empty strings.
llvm-svn: 90254
2009-12-01 19:20:00 +00:00
Dan Gohman
8def6e3daf
Minor cleanups.
...
llvm-svn: 90253
2009-12-01 19:16:15 +00:00
Dan Gohman
939c828604
Trim an unnecessary #include.
...
llvm-svn: 90252
2009-12-01 19:13:27 +00:00
Daniel Dunbar
04433fe3e1
Don't default warnings to ON on MSVC, the spew is enough to triple the build time. :/
...
llvm-svn: 90251
2009-12-01 19:11:36 +00:00
Devang Patel
0a2c0bcb14
Clear function specific containers while processing end of a function, even if DW_TAG_subprogram for current function is not found.
...
llvm-svn: 90247
2009-12-01 18:13:48 +00:00
Jim Grosbach
36d4dec28a
Thumb1 exception handling setjmp
...
llvm-svn: 90246
2009-12-01 18:10:36 +00:00
Johnny Chen
86fc920742
For VLDM/VSTM (Advanced SIMD), set encoding bits Inst{11-8} to 0b1011.
...
llvm-svn: 90243
2009-12-01 17:37:06 +00:00
Jakob Stoklund Olesen
defc47088a
Move PHIElimination::isLiveOut method to LiveVariables.
...
We want LiveVariables clients to use methods rather than accessing the
getVarInfo data structure directly. That way it will be possible to change the
LiveVariables representation.
llvm-svn: 90240
2009-12-01 17:13:31 +00:00
Gabor Greif
7ee0efd289
typo
...
llvm-svn: 90236
2009-12-01 15:53:33 +00:00
Gabor Greif
6b822ce675
demonstrate usage of Cases() mapping several strings to the same value; remove trailing spaces
...
llvm-svn: 90230
2009-12-01 12:53:56 +00:00
Mikhail Glushenkov
35c5591286
Add relocation model options.
...
llvm-svn: 90222
2009-12-01 09:47:11 +00:00
Mikhail Glushenkov
b5f718f063
Typo.
...
llvm-svn: 90221
2009-12-01 09:19:09 +00:00
Tobias Grosser
8b8a5b22cb
Fix copy paste bug
...
llvm-svn: 90220
2009-12-01 08:43:33 +00:00
Chris Lattner
9c2053b242
fix 255.vortex again, third time's the charm.
...
llvm-svn: 90217
2009-12-01 07:33:32 +00:00
Chris Lattner
367b5eafb7
minimize this a bit more.
...
llvm-svn: 90216
2009-12-01 07:30:01 +00:00
Mikhail Glushenkov
ed163ed103
Forward -save-temps to llvm-gcc.
...
llvm-svn: 90214
2009-12-01 06:51:30 +00:00
Chris Lattner
fd75b90d81
merge 2009-11-29-ReverseMap.ll into crash.ll
...
llvm-svn: 90212
2009-12-01 06:22:10 +00:00
Chris Lattner
3c9aca9079
fix PR5640 by tracking whether a block is the header of a loop more
...
precisely, which prevents us from infinitely peeling the loop.
llvm-svn: 90211
2009-12-01 06:04:43 +00:00
Mikhail Glushenkov
3a438a9336
Support -[weak_]framework and -F in llvmc.
...
llvm-svn: 90210
2009-12-01 05:59:55 +00:00
Eric Christopher
4b25bac791
Remove the gcc builtins from the intrinsics, we'll lower them
...
explicitly so we can check arguments.
llvm-svn: 90199
2009-12-01 03:18:26 +00:00
Jakob Stoklund Olesen
26667abbd3
Use CFG connectedness as a secondary sort key when deciding the order of copy coalescing.
...
This means that well connected blocks are copy coalesced before the less connected blocks. Connected blocks are more difficult to
coalesce because intervals are more complicated, so handling them first gives a greater chance of success.
llvm-svn: 90194
2009-12-01 03:03:00 +00:00
Eric Christopher
d6206a8b00
Add a soft link so that in an apple style build we can find libLTO.dylib.
...
llvm-svn: 90189
2009-12-01 02:26:01 +00:00
Oscar Fuentes
5c600b5435
Add two CMake flags LLVM_ENABLE_PEDANTIC and LLVM_ENABLE_WERROR,
...
PEDANTIC defaults to ON and WERROR default to off.
Also add MSVC warnings. To disable warnings add the flags
LLVM_ENABLE_WARNINGS (default on).
Patch by Tobias Grosser!
llvm-svn: 90188
2009-12-01 02:21:51 +00:00
Chris Lattner
4ba8e5d14f
fix PR5649 by making fib use the JIT instead of the interpreter, patch by Perry Lorier!
...
llvm-svn: 90186
2009-12-01 01:56:27 +00:00
Dan Gohman
03f90ab0a9
Add a comment about A[i+(j+1)].
...
llvm-svn: 90185
2009-12-01 01:38:10 +00:00
Bill Wendling
05252355b8
Remove some validation errors.
...
llvm-svn: 90184
2009-12-01 00:59:58 +00:00
Bill Wendling
991b84e5a7
Some formatting and spelling fixes.
...
llvm-svn: 90182
2009-12-01 00:53:11 +00:00
Dan Gohman
461b937053
Devang pointed out that this code should use DIScope instead of
...
DICompileUnit. This code now prints debug filenames successfully.
llvm-svn: 90181
2009-12-01 00:45:56 +00:00
Evan Cheng
1d31fc9123
Fix PR5614: parts of a physical register def may be killed the rest.
...
llvm-svn: 90180
2009-12-01 00:44:45 +00:00
Devang Patel
3daa96b079
Test case for r90175.
...
llvm-svn: 90176
2009-12-01 00:13:06 +00:00
Johnny Chen
ee536b0ea4
For VMOV (immediate), make some of the encoding bits (cmode and op) unspecified.
...
For VMOVv*i[16,32], op bit is don't care, and some cmode bits vary depending on
the immediate values.
Ref: Table A7-15 Modified immediate values for Advanced SIMD instructions.
llvm-svn: 90173
2009-12-01 00:02:02 +00:00
Devang Patel
ae466efe2e
If pointer type has a name then do not ignore the name.
...
llvm-svn: 90172
2009-11-30 23:56:56 +00:00
Oscar Fuentes
cc71783b32
* CMakeLists.txt: Adds warnings flags for g++. Fixes PR 5647.
...
llvm-svn: 90170
2009-11-30 23:50:14 +00:00
Oscar Fuentes
d2d1be4d22
* cmake/modules/LLVMLibDeps.cmake: Updated library dependencies.
...
llvm-svn: 90169
2009-11-30 23:48:51 +00:00
Dan Gohman
3ee8bc9b35
Minor whitespace fixes.
...
llvm-svn: 90166
2009-11-30 23:33:53 +00:00
Dan Gohman
6f51309021
Fix a minor inconsistency.
...
llvm-svn: 90165
2009-11-30 23:33:37 +00:00
Dan Gohman
ec30044cf7
Fix typos in comments.
...
llvm-svn: 90164
2009-11-30 23:30:43 +00:00
Jakob Stoklund Olesen
020d8d4c63
New virtual registers created for spill intervals should inherit allocation hints from the original register.
...
This helps us avoid silly copies when rematting values that are copied to a physical register:
leaq _.str44(%rip), %rcx
movq %rcx, %rsi
call _strcmp
becomes:
leaq _.str44(%rip), %rsi
call _strcmp
The coalescer will not touch the movq because that would tie down the physical register.
llvm-svn: 90163
2009-11-30 22:55:54 +00:00
Bill Wendling
120037fec7
Debug info is disabled on PPC Darwin.
...
llvm-svn: 90160
2009-11-30 22:23:29 +00:00
Bob Wilson
598f8ff9e5
Reprioritize tests for tail duplication to be aggressive about indirect
...
branches even when optimizing for code size. Unless we find evidence to the
contrary in the future, the special treatment for indirect branches does not
have a significant effect on code size, and performance still matters with -Os.
llvm-svn: 90147
2009-11-30 18:56:45 +00:00
Bob Wilson
505ddaa4dc
Remove isProfitableToDuplicateIndirectBranch target hook. It is profitable
...
for all the processors where I have tried it, and even when it might not help
performance, the cost is quite low. The opportunities for duplicating
indirect branches are limited by other factors so code size does not change
much due to tail duplicating indirect branches aggressively.
llvm-svn: 90144
2009-11-30 18:35:03 +00:00
Bob Wilson
c168a52627
Fix some more ARM unified syntax warnings.
...
llvm-svn: 90141
2009-11-30 17:47:19 +00:00
Benjamin Kramer
7da76a20c0
Fix odd declaration.
...
llvm-svn: 90138
2009-11-30 15:52:29 +00:00
Tobias Grosser
9caf3801ca
Fix last DOTGraphTraits problems in CompilationGraph.
...
llvm-svn: 90136
2009-11-30 13:34:51 +00:00
Tobias Grosser
0729c6e281
Remove forgotten ShortNames in Trie and CompilationGraph
...
llvm-svn: 90135
2009-11-30 13:14:13 +00:00
Tobias Grosser
dd7f2e797f
Remove ShortNames from getNodeLabel in DOTGraphTraits
...
llvm-svn: 90134
2009-11-30 12:38:47 +00:00
Tobias Grosser
90d334032a
Instantiate DefaultDOTGraphTraits
...
llvm-svn: 90133
2009-11-30 12:38:13 +00:00
Tobias Grosser
8d6f6b74b1
Do not point edge heads to source labels
...
If no destination label is available, just point to the node itself
instead of pointing to some source label. Source and destination labels are
not related in any way.
llvm-svn: 90132
2009-11-30 12:37:39 +00:00
Tobias Grosser
f444599ef0
Only print edgeSourceLabels if they are not empty
...
Graphviz can layout the graphs better if a node does not contain source
ports. Therefore only print the ports if the source ports are useful,
that means are not labeled with the empty string "".
This patch also simplifies graphs without any edgeSourceLabels e.g. the
dominance trees.
llvm-svn: 90131
2009-11-30 12:24:40 +00:00
Tobias Grosser
f7495f497a
Small PostDominatorTree improvements
...
* Do not SEGFAULT if tree entryNode() is NULL
* Print function names in dotty printer
llvm-svn: 90130
2009-11-30 12:06:37 +00:00
Tobias Grosser
5f0988ceb0
Remove ":" after BB name in -view-cfg-only
...
llvm-svn: 90129
2009-11-30 11:55:24 +00:00
Eric Christopher
7348432ade
First pass at llvm.objectsize documentation.
...
llvm-svn: 90116
2009-11-30 08:03:53 +00:00
Nick Lewycky
2d32947099
Revert r90107, fixing test/Transforms/GVN/2009-11-29-ReverseMap.ll and the
...
llvm-gcc build.
llvm-svn: 90113
2009-11-30 07:05:51 +00:00
Nick Lewycky
8a29dd4c7f
Add a testcase for the current llvm-gcc build failure.
...
llvm-svn: 90112
2009-11-30 07:02:18 +00:00
Nick Lewycky
1c2720320b
Remove the 'simple jit' tutorial as it wasn't really being maintained and its
...
material is covered by the Kaleidoscope tutorial.
llvm-svn: 90111
2009-11-30 04:23:17 +00:00
Mon P Wang
031cb00246
Add test case for r90108
...
llvm-svn: 90109
2009-11-30 02:42:27 +00:00
Mon P Wang
32f8bb9ed4
Added support to allow clients to custom widen. For X86, custom widen vectors for
...
divide/remainder since these operations can trap by unroll them and adding undefs
for the resulting vector.
llvm-svn: 90108
2009-11-30 02:42:02 +00:00
Chris Lattner
4d252d20e8
reapply r90093 with an addition of keeping the forward
...
and reverse nonlocal memdep maps in synch, this should
fix 255.vortex.
llvm-svn: 90107
2009-11-30 02:26:29 +00:00
Nick Lewycky
fef0c67d01
Fix this test on 64-bit systems which seem to use i64 for gep indices sometimes
...
while 32-bit gcc uses i32.
llvm-svn: 90106
2009-11-30 02:23:57 +00:00
Nick Lewycky
95ef6c9560
Commit r90099 made LLVM simplify one of these constant expressions a little
...
more. Update the syntax we're checking for and filecheckize it too.
This will fix the selfhost buildbots but will 'break' the others (sigh) because
they're still linked against older LLVM which is emitting less optimized IR.
llvm-svn: 90104
2009-11-30 00:38:56 +00:00
Nick Lewycky
e35e6f097d
Teach ConstantFolding to do a better job when folding gep(bitcast).
...
This permits the devirtualization of llvm.org/PR3100#c9 when compiled by clang.
llvm-svn: 90099
2009-11-29 21:40:55 +00:00
Benjamin Kramer
3efc050ac4
Revert r90089 for now, it's breaking selfhost.
...
llvm-svn: 90097
2009-11-29 21:17:48 +00:00
Chris Lattner
0311ade94c
revert this patch for now, it causes failures of:
...
LLVM::Transforms/GVN/2009-02-17-LoadPRECrash.ll
LLVM::Transforms/GVN/2009-06-17-InvalidPRE.ll
llvm-svn: 90096
2009-11-29 21:14:59 +00:00
Chris Lattner
52e7715b0b
Fix a really nasty caching bug I introduced in memdep. An entry
...
was being added to the Result vector, but not being put in the
cache. This means that if the cache was reused wholesale for a
later query that it would be missing this entry and we'd do an
incorrect load elimination.
Unfortunately, it's not really possible to write a useful
testcase for this, but this unbreaks 255.vortex.
llvm-svn: 90093
2009-11-29 21:09:36 +00:00
Benjamin Kramer
bfa993ab20
Fix two FIXMEs.
...
llvm-svn: 90089
2009-11-29 20:29:30 +00:00
Nick Lewycky
0a1f25b927
Detabify.
...
llvm-svn: 90085
2009-11-29 18:10:39 +00:00
Benjamin Kramer
8cb52c266f
Remove dead returns.
...
llvm-svn: 90083
2009-11-29 17:42:58 +00:00
Kovarththanan Rajaratnam
4b9f0b6720
This patch ensures that Path::GetMainExecutable is able to handle the
...
case where realpath() fails. When this occurs we segfault trying to
create a std::string from a NULL pointer.
Fixes PR5635.
llvm-svn: 90082
2009-11-29 17:19:48 +00:00
Daniel Dunbar
53b95c4080
Fix FileCheck crash when fuzzy scanning starting at the end of the file.
...
llvm-svn: 90065
2009-11-29 08:30:24 +00:00
Chris Lattner
1cc4cca193
add testcases for the foo_with_overflow op xforms added recently and
...
fix bugs exposed by the tests. Testcases from Alastair Lynn!
llvm-svn: 90056
2009-11-29 02:57:29 +00:00
Chris Lattner
6a05f2dc8e
mark all the 'foo with overflow' intrinsics as readnone.
...
llvm-svn: 90055
2009-11-29 02:44:33 +00:00
Chris Lattner
58ccf88c36
update and consolidate the load pre notes.
...
llvm-svn: 90050
2009-11-29 02:19:52 +00:00
Chris Lattner
0d39613f65
add PR#
...
llvm-svn: 90049
2009-11-29 01:28:58 +00:00
Chris Lattner
73d45454be
Add a testcase for:
...
void test(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j] = G[j] + G[j+1] + G[j-1];
}
which we now compile to one load in the loop:
LBB1_2: ## %bb
movsd 16(%rsi,%rax,8), %xmm2
incq %rdx
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movapd %xmm2, %xmm1
movsd %xmm0, 8(%rsi,%rax,8)
incq %rax
cmpq %rcx, %rax
jne LBB1_2
instead of:
LBB1_2: ## %bb
movsd 8(%rsi,%rax,8), %xmm0
addsd 16(%rsi,%rax,8), %xmm0
addsd (%rsi,%rax,8), %xmm0
movsd %xmm0, 8(%rsi,%rax,8)
incq %rax
cmpq %rcx, %rax
jne LBB1_2
llvm-svn: 90048
2009-11-29 01:15:43 +00:00
Chris Lattner
a73adac52e
add a testcase for
...
void test9(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
llvm-svn: 90047
2009-11-29 01:04:40 +00:00
Chris Lattner
cd261c9c26
Implement PR5634.
...
llvm-svn: 90046
2009-11-29 00:51:17 +00:00
Nick Lewycky
218a3393f4
Teach memdep to look for memory use intrinsics during dependency queries. Fixes
...
PR5574.
llvm-svn: 90045
2009-11-28 21:27:49 +00:00
Chris Lattner
32140312ca
reenable load address insertion in load pre. This allows us to
...
handle cases like this:
void test(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
where G[1] isn't live into the loop.
llvm-svn: 90041
2009-11-28 16:08:18 +00:00
Chris Lattner
44da5bd837
Enhance InsertPHITranslatedPointer to be able to return a list of newly
...
inserted instructions. No functionality change until someone starts using it.
llvm-svn: 90039
2009-11-28 15:39:14 +00:00
Chris Lattner
c7bc66dfc6
implement a FIXME: limit the depth that DecomposeGEPExpression goes the same
...
way that getUnderlyingObject does it.
This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!'
assertion on sqlite3.
llvm-svn: 90038
2009-11-28 15:12:41 +00:00
Chris Lattner
d5bd369a0f
enable code to handle un-phi-translatable cases more aggressively:
...
if we don't have an address expression available in a predecessor,
then model this as the value being clobbered at the end of the pred
block instead of being modeled as a complete phi translation failure.
This is important for PRE of loads because we want to see that the
load is available in all but this predecessor, and complete phi
translation failure results in not getting any information about
predecessors.
This doesn't do anything until I renable code insertion since PRE
now sees that it is available in all but one predecessors, but can't
insert the addressing in the predecessor that is missing it to
eliminate the redundancy.
llvm-svn: 90037
2009-11-28 14:54:10 +00:00
Chris Lattner
cf0b198827
disable value insertion for now, I need to figure out how
...
to inform GVN about the newly inserted values. This fixes
PR5631.
llvm-svn: 90022
2009-11-27 22:50:07 +00:00
Chris Lattner
2be52e72ae
Rework InsertPHITranslatedPointer to handle the recursive case, this
...
fixes PR5630 and sets the stage for the next phase of goodness (testcase
pending).
llvm-svn: 90019
2009-11-27 22:05:15 +00:00
Chris Lattner
4ee17e1482
recursively phi translate bitcast operands too, for consistency.
...
llvm-svn: 90016
2009-11-27 20:25:30 +00:00
Nick Lewycky
6e0525141f
Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias Grosser
...
for pointing this out.
llvm-svn: 90015
2009-11-27 19:57:53 +00:00
Chris Lattner
d141f885a1
I accidentally implemented this :)
...
llvm-svn: 90014
2009-11-27 19:56:00 +00:00
Chris Lattner
2f0354ecf0
add support for recursive phi translation and phi
...
translation of add with immediate. This allows us
to optimize this function:
void test(int N, double* G) {
long j;
G[1] = 1;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
to only do one load every iteration of the loop.
llvm-svn: 90013
2009-11-27 19:11:31 +00:00
Chris Lattner
e66f84e012
add two simple test cases we now optimize (to one load in the loop each) and one we don't (corresponding to the fixme I added yesterday).
...
llvm-svn: 90012
2009-11-27 18:08:30 +00:00
Chris Lattner
3d9823b9cf
factor some logic out of instcombine into a new SimplifyAddInst method.
...
llvm-svn: 90011
2009-11-27 17:42:22 +00:00
Chris Lattner
83a4a9868f
add a deadargelim note.
...
llvm-svn: 90009
2009-11-27 17:12:30 +00:00
Chris Lattner
ca9e0e83b3
This testcase is actually only partially redundant, and requires
...
the FIXME I added yesterday to be implemented.
llvm-svn: 90008
2009-11-27 16:53:57 +00:00
Chris Lattner
2226db66ab
fix PR5436 by making the 'simple' case of SRoA not promote out of range
...
array indexes. The "complex" case of SRoA still handles them, and correctly.
This fixes a weirdness where we'd correctly avoid transforming A[0][42] if
the 42 was too large, but we'd only do it if it was one gep, not two separate
ones.
llvm-svn: 90007
2009-11-27 16:37:41 +00:00
Chris Lattner
92ba18e9e4
filecheckize
...
llvm-svn: 90006
2009-11-27 16:31:59 +00:00
Duncan Sands
b56334b4f2
While this test is testing a problem in the generic part of codegen,
...
the problem only shows for msp430 and pic16 which is why it specifies
them using -march. But it is wrong to put such tests in CodeGen/Generic,
since not everyone builds these targets. Put a copy of the test in each
of the target test directories.
llvm-svn: 90005
2009-11-27 16:04:14 +00:00
Duncan Sands
31c0e0ee35
Vector types are no longer required to have a power-of-two length.
...
llvm-svn: 90004
2009-11-27 13:38:03 +00:00
Duncan Sands
ee7425cc56
These code generator limitations have been removed.
...
llvm-svn: 90003
2009-11-27 12:33:22 +00:00
Chris Lattner
6d294de548
add comment.
...
llvm-svn: 90002
2009-11-27 08:40:14 +00:00
Chris Lattner
ac323297e0
reduce nesting, no functionality change.
...
llvm-svn: 90001
2009-11-27 08:37:22 +00:00
Chris Lattner
8e62d0a93d
limit the recursion depth of GetLinearExpression. This
...
fixes a crash analyzing consumer-lame, which had an "%X = add %X, 1"
in unreachable code.
llvm-svn: 90000
2009-11-27 08:32:52 +00:00
Chris Lattner
25be93dfed
teach GVN's load PRE to insert computations of the address in predecessors
...
where it is not available. It's unclear how to get this inserted
computation into GVN's scalar availability sets, Owen, help? :)
llvm-svn: 89997
2009-11-27 08:25:10 +00:00
Chris Lattner
41a5bba4e0
add some tests for memdep phi translation + PRE.
...
llvm-svn: 89996
2009-11-27 06:42:42 +00:00
Chris Lattner
fa76d23c1d
this test is failing, and is expected to.
...
llvm-svn: 89995
2009-11-27 06:36:28 +00:00
Chris Lattner
4f1552bde7
filecheckize
...
llvm-svn: 89994
2009-11-27 06:33:09 +00:00
Chris Lattner
66426c70e6
rename test.
...
llvm-svn: 89993
2009-11-27 06:31:55 +00:00
Chris Lattner
a9a76ccf56
Fix phi translation in load PRE to agree with the phi
...
translation done by memdep, and reenable gep translation
again.
llvm-svn: 89992
2009-11-27 06:31:14 +00:00
Chris Lattner
b018bda665
redisable this, my bootstrap worked because it wasn't an optimized build, whoops.
...
llvm-svn: 89991
2009-11-27 05:53:01 +00:00
Chris Lattner
fb8a718fc3
try again.
...
llvm-svn: 89990
2009-11-27 05:19:56 +00:00
Chris Lattner
14444f5c1a
this is causing buildbot failures, disable for now.
...
llvm-svn: 89985
2009-11-27 01:52:22 +00:00
Chris Lattner
cc6d29286c
this (and probably several others) are now done.
...
llvm-svn: 89982
2009-11-27 00:35:04 +00:00
Chris Lattner
5030c6ab21
teach phi translation of GEPs to simplify geps like 'gep x, 0'.
...
This allows us to compile the example from PR5313 into:
LBB1_2: ## %bb
incl %ecx
movb %al, (%rsi)
movslq %ecx, %rax
movb (%rdi,%rax), %al
testb %al, %al
jne LBB1_2
instead of:
LBB1_2: ## %bb
movslq %eax, %rcx
incl %eax
movb (%rdi,%rcx), %cl
movb %cl, (%rsi)
movslq %eax, %rcx
cmpb $0, (%rdi,%rcx)
jne LBB1_2
llvm-svn: 89981
2009-11-27 00:34:38 +00:00
Chris Lattner
8574aba4ea
factor some instcombine simplifications for getelementptr out to a new
...
SimplifyGEPInst method in InstructionSimplify.h. No functionality change.
llvm-svn: 89980
2009-11-27 00:29:05 +00:00
Chris Lattner
4c88e814b8
teach memdep to do trivial PHI translation of GEPs. More to
...
come.
llvm-svn: 89979
2009-11-27 00:07:37 +00:00
Chris Lattner
9bd2136ca3
Teach memdep to phi translate bitcasts. This allows us to compile
...
the example in GCC PR16799 to:
LBB1_2: ## %bb1
movl %eax, %eax
subq %rax, %rdi
movq %rdi, (%rcx)
movl (%rdi), %eax
testl %eax, %eax
je LBB1_2
instead of:
LBB1_2: ## %bb1
movl (%rdi), %ecx
subq %rcx, %rdi
movq %rdi, (%rax)
cmpl $0, (%rdi)
je LBB1_2
llvm-svn: 89978
2009-11-26 23:41:07 +00:00
Chris Lattner
dfaa592de1
convert to filecheck
...
llvm-svn: 89977
2009-11-26 23:32:59 +00:00
Nick Lewycky
a75fe185ba
Fix typo spotted by Gabor Greif.
...
llvm-svn: 89976
2009-11-26 23:19:05 +00:00
Chris Lattner
c49f5ac7d8
factor some code out into some helper functions.
...
llvm-svn: 89975
2009-11-26 23:18:49 +00:00
Nick Lewycky
898e8f756a
Clean up file, no functionality change.
...
llvm-svn: 89974
2009-11-26 22:54:26 +00:00
Chris Lattner
0f77ac2640
Add a hack for PR5601, a crash on obsolete syntax that we plan to
...
remove in LLVM 3.0
llvm-svn: 89973
2009-11-26 22:48:23 +00:00
Chris Lattner
a5bc618a91
fix crash on Transforms/InstCombine/intrinsics.ll introduced by r89970
...
llvm-svn: 89972
2009-11-26 22:08:06 +00:00
Chris Lattner
a73ecf0b00
Fix PR5471 by removing an instcombine xform. Some pieces of the code
...
generates store to undef and some generates store to null as the idiom
for undefined behavior. Since simplifycfg zaps both, don't remove the
undefined behavior in instcombine.
llvm-svn: 89971
2009-11-26 22:04:42 +00:00
Chris Lattner
5b83ba215d
implement a bunch of xforms for overflow intrinsics, based on a patch
...
by Alastair Lynn.
llvm-svn: 89970
2009-11-26 21:42:47 +00:00
Bob Wilson
9594db5693
Rename new TailDuplicationPass to avoid name conflict with the old one.
...
llvm-svn: 89968
2009-11-26 21:38:41 +00:00
Chris Lattner
5fe97e7aca
@test9 is a testcase for r89958. Before 89958, we misanalyzed the
...
first expression as P+4+4*i which we considered to possibly alias
P+4*j. Now we correctly analyze the former one as P+1+4*i.
@test10 is a sanity test that verfies that we know that P+4+4*i != P+4*i.
llvm-svn: 89960
2009-11-26 19:25:46 +00:00
Chris Lattner
1bf7ff704a
Implement PR1143 (at -m64) by making basicaa look through extensions. We
...
previously already handled it at -m32 because there were no i32->i64
extensions for addressing.
llvm-svn: 89959
2009-11-26 18:53:33 +00:00
Chris Lattner
d7cabea8ca
fix two transposed lines duncan caught and add an explanatory comment.
...
llvm-svn: 89958
2009-11-26 18:35:46 +00:00
Chris Lattner
9aa846956e
this todo is resolved.
...
llvm-svn: 89957
2009-11-26 17:14:10 +00:00
Chris Lattner
29f82a1465
move DecomposeGEPExpression out into ValueTracking.cpp
...
llvm-svn: 89956
2009-11-26 17:12:50 +00:00
Chris Lattner
631c5b2cb9
teach GetLinearExpression to be a bit more aggressive.
...
llvm-svn: 89955
2009-11-26 17:00:01 +00:00
Chris Lattner
5c1cfc252c
resolve a fixme. I haven't figured out how to write a testcase
...
to exercise this though.
llvm-svn: 89954
2009-11-26 16:52:32 +00:00
Chris Lattner
ba0014a44c
update status of this. basicaa is much improved now,
...
only missing the one form (in this testcase). Dan, do you
consider this example to be important?
llvm-svn: 89953
2009-11-26 16:42:00 +00:00
Chris Lattner
29bc8a91d3
Teach basicaa that x|c == x+c when the c bits of x are clear. This
...
allows us to compile the example in readme.txt into:
LBB1_1: ## %bb
movl 4(%rdx,%rax), %ecx
movl %ecx, %esi
imull (%rdx,%rax), %esi
imull %esi, %ecx
movl %esi, 8(%rdx,%rax)
imull %ecx, %esi
movl %ecx, 12(%rdx,%rax)
movl %esi, 16(%rdx,%rax)
imull %ecx, %esi
movl %esi, 20(%rdx,%rax)
addq $16, %rax
cmpq $4000, %rax
jne LBB1_1
instead of:
LBB1_1:
movl (%rdx,%rax), %ecx
imull 4(%rdx,%rax), %ecx
movl %ecx, 8(%rdx,%rax)
imull 4(%rdx,%rax), %ecx
movl %ecx, 12(%rdx,%rax)
imull 8(%rdx,%rax), %ecx
movl %ecx, 16(%rdx,%rax)
imull 12(%rdx,%rax), %ecx
movl %ecx, 20(%rdx,%rax)
addq $16, %rax
cmpq $4000, %rax
jne LBB1_1
GCC (4.2) doesn't seem to be able to eliminate the loads in this
testcase either, it generates:
L2:
movl (%rdx), %eax
imull 4(%rdx), %eax
movl %eax, 8(%rdx)
imull 4(%rdx), %eax
movl %eax, 12(%rdx)
imull 8(%rdx), %eax
movl %eax, 16(%rdx)
imull 12(%rdx), %eax
movl %eax, 20(%rdx)
addl $4, %ecx
addq $16, %rdx
cmpl $1002, %ecx
jne L2
llvm-svn: 89952
2009-11-26 16:26:43 +00:00
Chris Lattner
12dacdd359
teach basicaa that A[i] != A[i+1].
...
llvm-svn: 89951
2009-11-26 16:18:10 +00:00
Chris Lattner
453751031a
rename test
...
llvm-svn: 89950
2009-11-26 16:08:41 +00:00
Chris Lattner
7a5b56aca9
Change the other half of aliasGEP (which handles GEP differencing) to use DecomposeGEPExpression. This dramatically simplifies and shrinks the code by eliminating the horrible CheckGEPInstructions method, fixes a miscompilation ( @test3 ) and makes the code more aggressive. In particular, we now handle the @test4 case, which is reduced from the SmallPtrSet constructor. Missing this caused us to emit a variable length memset instead of a fixed size one.
...
llvm-svn: 89922
2009-11-26 02:17:34 +00:00
Chris Lattner
0d23076adf
add a new random feature test
...
llvm-svn: 89921
2009-11-26 02:16:28 +00:00
Chris Lattner
5341c9679d
Generalize DecomposeGEPExpression to exactly handle what Value::getUnderlyingObject does (when TD is around). This allows us to avoid calling DecomposeGEPExpression unless the ultimate alias check we care about passes, speedup up BasicAA a bit.
...
llvm-svn: 89920
2009-11-26 02:14:59 +00:00
Chris Lattner
8928899413
Implement a new DecomposeGEPExpression method, which decomposes a GEP into a list of scaled offsets. Use this to eliminate some previous ad-hoc code which was subtly broken (it assumed all Constant*'s were non-zero, but strange constant express could be zero).
...
llvm-svn: 89915
2009-11-26 02:13:03 +00:00
Chris Lattner
a99edbedd1
Use GEPOperator more pervasively to simplify code.
...
llvm-svn: 89914
2009-11-26 02:11:08 +00:00
Chris Lattner
8e09ad6f3c
update some notes slightly
...
llvm-svn: 89913
2009-11-26 01:51:18 +00:00
Chris Lattner
4f0b47d9e7
remove some redundant braces
...
llvm-svn: 89912
2009-11-26 01:50:12 +00:00
Evan Cheng
a4c986cbdd
Test for 89905.
...
llvm-svn: 89906
2009-11-26 00:35:01 +00:00
Evan Cheng
595a16300c
When all defs of a vr are implicit_def, delete all of the defs.
...
llvm-svn: 89905
2009-11-26 00:32:36 +00:00
Bob Wilson
2d4ff12da9
Split tail duplication into a separate pass. This is needed to avoid
...
running tail duplication when doing branch folding for if-conversion, and
we also want to be able to run tail duplication earlier to fix some
reg alloc problems. Move the CanFallThrough function from BranchFolding
to MachineBasicBlock so that it can be shared by TailDuplication.
llvm-svn: 89904
2009-11-26 00:32:21 +00:00
Dale Johannesen
979ac9fce4
Test for llvm-gcc checkin 89898.
...
llvm-svn: 89899
2009-11-25 23:50:09 +00:00
Devang Patel
4da997b936
Update to reflect recent debugging information encoding changes.
...
llvm-svn: 89896
2009-11-25 23:28:01 +00:00
Viktor Kutuzov
8981b3abe5
Rollback changes r89516: Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.
...
llvm-svn: 89893
2009-11-25 22:44:18 +00:00
Evan Cheng
44df27e964
ProcessImplicitDefs should watch out for invalidated iterator and extra implicit operands on copies.
...
llvm-svn: 89880
2009-11-25 21:13:39 +00:00
Bob Wilson
4419301d81
Tail duplicate indirect branches for PowerPC, too.
...
With the testcase for pr3120, the "threaded interpreter" runtime decreases
from 1788 to 1413 with this change.
llvm-svn: 89877
2009-11-25 19:57:14 +00:00
Benjamin Kramer
4cd30817d3
Avoid some possibly unsafe uses of StringRef::data().
...
llvm-svn: 89873
2009-11-25 18:26:09 +00:00
Devang Patel
2d9caf9fe5
Use StringRef (again) in DebugInfo interface.
...
llvm-svn: 89866
2009-11-25 17:36:49 +00:00
Bob Wilson
120f729eca
Based on the testcase for pr3120, running on my MacPro with Xeon processors,
...
it is definitely profitable to tail duplicate indirect branches for x86.
This is likely to be true to various degrees for all modern x86 processors.
llvm-svn: 89865
2009-11-25 17:27:53 +00:00
Bruno Cardoso Lopes
2db07581b7
Support PIC loading of constant pool entries
...
llvm-svn: 89863
2009-11-25 12:17:58 +00:00
Edward O'Callaghan
87e82ced60
Adjust comments to new semantics.
...
llvm-svn: 89862
2009-11-25 12:00:34 +00:00
Daniel Dunbar
900f2ce31c
Sketch structure for X86 disassembler.
...
llvm-svn: 89850
2009-11-25 06:53:08 +00:00
Edward O'Callaghan
746782dde5
API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards to comments from 89765 post review.
...
llvm-svn: 89848
2009-11-25 06:32:19 +00:00
Douglas Gregor
7baad7365a
Perform explicit instantiations in the proper namespace, since Clang diagnoses this ill-formity.
...
llvm-svn: 89846
2009-11-25 06:04:18 +00:00
Edward O'Callaghan
2b8fed15e0
Reverting patch in revision 89758, initial attempt at fixing PR5373 has proven to be bogus.
...
llvm-svn: 89844
2009-11-25 05:38:41 +00:00
Daniel Dunbar
e8b8ccefcb
Add the rest of the build system logic for optional target disassemblers
...
llvm-svn: 89841
2009-11-25 04:46:58 +00:00
Daniel Dunbar
3202720933
Regenerate configure
...
llvm-svn: 89840
2009-11-25 04:37:28 +00:00
Daniel Dunbar
f472129722
Add CMake and configure logic to create llvm/Config/Disassemblers.defs.
...
llvm-svn: 89839
2009-11-25 04:30:13 +00:00
Daniel Dunbar
e502433d7f
Sketch TableGen disassembler emitter, based on patch by Sean Callanan.
...
llvm-svn: 89833
2009-11-25 02:13:23 +00:00
Bruno Cardoso Lopes
2c6d498ccc
Use endianess dependent offsets for load/store of doubles when
...
using two swc/lwc instead of sdc/ldc.
llvm-svn: 89826
2009-11-25 01:05:25 +00:00
Dale Johannesen
e0eb336588
Fix compiler warnings.
...
llvm-svn: 89824
2009-11-25 00:58:21 +00:00
Bruno Cardoso Lopes
fa2741e0d3
Only include in the callee saved regs the sub registers to avoid
...
unnecessary save/restore.
llvm-svn: 89823
2009-11-25 00:47:43 +00:00
Bruno Cardoso Lopes
dce6f66cf0
Add proper emission of load/store double to stack slots for mips1 targets!
...
llvm-svn: 89821
2009-11-25 00:36:00 +00:00
Devang Patel
d23ea6a33b
Revert r89803.
...
llvm-svn: 89819
2009-11-25 00:31:13 +00:00
Bob Wilson
d4d40670e8
Refactor target hook for tail duplication as requested by Chris.
...
Make tail duplication of indirect branches much more aggressive (for targets
that indicate that it is profitable), based on further experience with
this transformation. I compiled 3 large applications with and without
this more aggressive tail duplication and measured minimal changes in code
size. ("size" on Darwin seems to round the text size up to the nearest
page boundary, so I can only say that any code size increase was less than
one 4k page.) Radar 7421267.
llvm-svn: 89814
2009-11-24 23:35:49 +00:00
Dale Johannesen
5ece8f0a20
Do not store R31 into the caller's link area on PPC.
...
This violates the ABI (that area is "reserved"), and
while it is safe if all code is generated with current
compilers, there is some very old code around that uses
that slot for something else, and breaks if it is stored
into. Adjust testcases looking for current behavior.
I've verified that the stack frame size is right in all
testcases, whether it changed or not. 7311323.
llvm-svn: 89811
2009-11-24 22:59:02 +00:00
Devang Patel
29c9b709e3
Enable debug info for ppc-darwin.
...
llvm-svn: 89803
2009-11-24 21:38:54 +00:00
Devang Patel
b3e0168428
Use StringRef instead of std::string in DIEString.
...
llvm-svn: 89793
2009-11-24 19:42:17 +00:00
Devang Patel
21c2e100ba
Remove DebugLabelFolder pass. It is not used by dwarf writer anymore.
...
llvm-svn: 89790
2009-11-24 19:37:07 +00:00
Devang Patel
c8654eb64e
Swith to pubtypes section before emitting pub types.
...
llvm-svn: 89787
2009-11-24 19:18:41 +00:00
Daniel Dunbar
7402c472c3
Remove bogus error handling code.
...
llvm-svn: 89786
2009-11-24 19:03:33 +00:00
Edward O'Callaghan
2b12faa1fd
Fix comments as pre-post review for rev.89765.
...
llvm-svn: 89770
2009-11-24 16:29:23 +00:00
Edward O'Callaghan
dddf134a3c
Provide Path::isSpecialFile interface for PR5568.
...
llvm-svn: 89765
2009-11-24 15:19:10 +00:00
Edward O'Callaghan
5fd452d596
Fix for PR5373, Credit to Jakub Staszak.
...
llvm-svn: 89758
2009-11-24 11:51:52 +00:00
Evan Cheng
184ec26fcd
Enable predication of NEON instructions in Thumb2 mode.
...
llvm-svn: 89748
2009-11-24 08:06:15 +00:00
Jeffrey Yasskin
9c2d34012d
Oops. Re-disable JITTest.NoStubs on ARM and PPC since they still use stubs to
...
make far calls work.
llvm-svn: 89733
2009-11-24 02:11:14 +00:00
Dan Gohman
cfb181d3cb
Delete some dead and non-obvious code.
...
llvm-svn: 89729
2009-11-24 01:48:15 +00:00
Devang Patel
04d2f2d192
Emit pubtypes.
...
llvm-svn: 89725
2009-11-24 01:14:22 +00:00
Dale Johannesen
86dcae106d
Make capitalization of names starting "is" more consistent.
...
No functional change.
llvm-svn: 89724
2009-11-24 01:09:07 +00:00
Evan Cheng
ece825dc4f
Data type suffix must come after predicate.
...
llvm-svn: 89723
2009-11-24 01:05:23 +00:00
David Goodwin
3f3a8b1c7e
<rdar://problem/6721894>. Allow multiple registers to be renamed together (super and sub) if necessary to break an anti-dependence.
...
llvm-svn: 89722
2009-11-24 00:59:08 +00:00
Anton Korobeynikov
2522908653
Materialize global addresses via movt/movw pair, this is always better
...
than doing the same via constpool:
1. Load from constpool costs 3 cycles on A9, movt/movw pair - just 2.
2. Load from constpool might stall up to 300 cycles due to cache miss.
3. Movt/movw does not use load/store unit.
4. Less constpool entries => better compiler performance.
This is only enabled on ELF systems, since darwin does not have needed
relocations (yet).
llvm-svn: 89720
2009-11-24 00:44:37 +00:00
Jim Grosbach
f890f51666
80 column violations
...
llvm-svn: 89718
2009-11-24 00:20:27 +00:00
Jeffrey Yasskin
f2ad571443
* Move stub allocation inside the JITEmitter, instead of exposing a
...
way for each TargetJITInfo subclass to allocate its own stubs. This
means stubs aren't as exactly-sized anymore, but it lets us get rid of
TargetJITInfo::emitFunctionStubAtAddr(), which lets ARM and PPC
support the eager JIT, fixing http://llvm.org/PR4816 .
* Rename the JITEmitter's stub creation functions to describe the kind
of stub they create. So far, all of them create lazy-compilation
stubs, but they sometimes get used when far-call stubs are needed.
Fixing http://llvm.org/PR5201 will involve fixing this.
llvm-svn: 89715
2009-11-23 23:35:19 +00:00
Jim Grosbach
bf2956a88b
enable iv-users simplification by default
...
llvm-svn: 89713
2009-11-23 23:25:54 +00:00
Dan Gohman
de5dea869f
Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.
...
Note that "hasDotLocAndDotFile"-style debug info was already broken;
people wanting this functionality should implement it in the
AsmPrinter/DwarfWriter code.
llvm-svn: 89711
2009-11-23 23:20:51 +00:00
Jeffrey Yasskin
19b48370fb
Allow more than one stub to be being generated at the same time.
...
It's probably better in the long run to replace the
indirect-GlobalVariable system. That'll be done after a subsequent
patch.
llvm-svn: 89708
2009-11-23 22:49:00 +00:00
Evan Cheng
738a97a1db
Massive refactoring of NEON instructions. Separate opcode from data size specifier suffix, move \t up stream to instruction format, and fix more 80 column violations.
...
This fixes the NEON asm printing so the "predicate" field is printed between the opcode and the data type suffix.
llvm-svn: 89706
2009-11-23 21:57:23 +00:00
Dan Gohman
3650f4ed0c
Simplify this code.
...
llvm-svn: 89702
2009-11-23 21:30:55 +00:00
Dan Gohman
2e3f187cbd
Print the debug info line and column in MachineInstr::print even when there's
...
no filename. This situation is apparently fairly common right now.
llvm-svn: 89701
2009-11-23 21:29:08 +00:00
Jim Grosbach
dbb4140f37
move fconst[sd] to UAL. <rdar://7414913>
...
llvm-svn: 89700
2009-11-23 21:08:25 +00:00
Johnny Chen
b6528d3244
Partially revert r84730 by removing N2VDup from ARMInstrFormats.td and modifying
...
VDUPLND and VDUPLNQ to derive from N2V instead of N2VDup. VDUPLND and VDUPLNQ
now expect op19_18 and op17_16 as the first two args.
llvm-svn: 89699
2009-11-23 21:00:43 +00:00
Jim Grosbach
50b293d65e
update test for 89694
...
llvm-svn: 89695
2009-11-23 20:39:53 +00:00
Jim Grosbach
04c0e76772
fold immediate of a + Const into the user as a subtract if it can fit as a negated two-part immediate.
...
llvm-svn: 89694
2009-11-23 20:35:53 +00:00
Johnny Chen
5ad7416260
Revert r84572 by removing N3VImm from ARMInstrFormats.td now that we can specify
...
{?,?,?,?} as op11_8 for VEXTd and VEXTq.
llvm-svn: 89693
2009-11-23 20:09:13 +00:00
Devang Patel
75e6a40d6d
Add CreateLocation varinat that accepts MDNode (with a default value).
...
llvm-svn: 89689
2009-11-23 19:11:20 +00:00
Devang Patel
b5b51598ba
Revert r89487.
...
llvm-svn: 89686
2009-11-23 18:43:37 +00:00
Johnny Chen
e97457afbc
Partially revert r89377 by removing NLdStLN class definition from
...
ARMInstrFormats.td and fixing VLD[234]LN* and VST[234]LN* to derive from NLdSt
instead of NLdStLN.
llvm-svn: 89684
2009-11-23 18:16:16 +00:00
Dan Gohman
9d72cbf2d5
Move CopyCatchInfo into FunctionLoweringInfo.cpp too, for consistency.
...
llvm-svn: 89683
2009-11-23 18:12:11 +00:00
Dan Gohman
1a6c47f1cb
Rename SelectionDAGLowering to SelectionDAGBuilder, and rename
...
SelectionDAGBuild.cpp to SelectionDAGBuilder.cpp.
llvm-svn: 89681
2009-11-23 18:04:58 +00:00
Johnny Chen
ebc60ef80c
Make it clear that the index bit(s) of Vector Get Lane and Vector Set Lane
...
should be left unspecified now that Bob Wilson has fixed pr5470.
llvm-svn: 89676
2009-11-23 17:48:17 +00:00
Dan Gohman
91aad4b834
Move RegsForValue to an anonymous namespace, since it is only used
...
in this file.
llvm-svn: 89675
2009-11-23 17:46:23 +00:00
Dan Gohman
ad97b3dbd0
Move some more code out of SelectionDAGBuild.cpp and into
...
FunctionLoweringInfo.cpp.
llvm-svn: 89674
2009-11-23 17:42:46 +00:00
David Goodwin
1f2457f8aa
Minor itinerary fixes for FP instructions.
...
llvm-svn: 89672
2009-11-23 17:34:12 +00:00
Ted Kremenek
9b6515794f
Update CMake file.
...
llvm-svn: 89671
2009-11-23 17:26:04 +00:00
Dan Gohman
a3624b6099
Move the FunctionLoweringInfo class and some related utility functions out
...
of SelectionDAGBuild.h/cpp into its own files, to help separate
general lowering logic from SelectionDAG-specific lowering logic.
llvm-svn: 89667
2009-11-23 17:16:22 +00:00
Chris Lattner
214ef9a4ef
fix comment, thanks all :)
...
llvm-svn: 89666
2009-11-23 17:07:35 +00:00
Chris Lattner
1e7b37ebba
use the new isNoAlias method to simplify some code, only do an escaping check if
...
we have a non-constant pointer. Constant pointers can't be local.
llvm-svn: 89665
2009-11-23 16:46:41 +00:00
Chris Lattner
98e25326a0
whitespace cleanup, tidying
...
llvm-svn: 89664
2009-11-23 16:45:27 +00:00
Chris Lattner
84ed59abcf
speed up BasicAA a bit by implementing a long-standing TODO.
...
llvm-svn: 89663
2009-11-23 16:44:43 +00:00
Chris Lattner
f2fa7bf0b7
add a helper
...
llvm-svn: 89662
2009-11-23 16:38:54 +00:00
Dan Gohman
05ebc8f71f
Move FunctionPassManagerImpl's dumpArguments and dumpPasses calls
...
out of its run function and into its doInitialization method, so
that it does the dump once instead of once per function.
llvm-svn: 89660
2009-11-23 16:24:18 +00:00
Dan Gohman
580b80d6d9
Make ConstantFoldConstantExpression recursively visit the entire
...
ConstantExpr, not just the top-level operator. This allows it to
fold many more constants.
Also, make GlobalOpt call ConstantFoldConstantExpression on
GlobalVariable initializers.
llvm-svn: 89659
2009-11-23 16:22:21 +00:00
Dan Gohman
1f522d98f8
Fix a use of an invalidated iterator in the case where there are multiple
...
adjacent uses of a dead basic block from the same user. This fixes PR5596.
llvm-svn: 89658
2009-11-23 16:13:39 +00:00
Duncan Sands
9d786d701d
I forgot to update the prototype for LLVMBuildIntCast when correcting
...
the body to not pass the name for the isSigned parameter. However it
seems that changing prototypes is a big-no-no, so here I revert the
previous change and pass "true" for isSigned, meaning this always does
a signed cast, which was the previous behaviour assuming the name was
not NULL! Some other C function needs to be introduced for the general
case of signed or unsigned casts. This hopefully unbreaks the ocaml
binding.
llvm-svn: 89648
2009-11-23 10:49:03 +00:00
Nick Lewycky
890a1d120f
Start catching LLVMContext misuse in the verifier.
...
llvm-svn: 89646
2009-11-23 04:52:00 +00:00
Nick Lewycky
15a1287c1f
Pull LLVMContext out of PromoteMemToReg.
...
llvm-svn: 89645
2009-11-23 03:50:44 +00:00
Nick Lewycky
621fe5614e
Remove LLVMContext and its include.
...
llvm-svn: 89644
2009-11-23 03:34:29 +00:00
Nick Lewycky
39dbfd3c58
Remove unused LLVMContext.
...
llvm-svn: 89642
2009-11-23 03:29:18 +00:00
Nick Lewycky
4e3b3f3d92
Remove dead LLVMContext argument.
...
llvm-svn: 89641
2009-11-23 03:26:09 +00:00
Nick Lewycky
922d4ab574
Reapply r88830 with a bugfix: this transform only applies to icmp eq/ne. This
...
fixes part of PR5438.
llvm-svn: 89639
2009-11-23 03:17:33 +00:00
Oscar Fuentes
1251697156
CMake: Updated library dependencies.
...
llvm-svn: 89637
2009-11-23 00:40:39 +00:00
Oscar Fuentes
dea579fde3
CMake: Do not try to install a target before it is defined.
...
llvm-svn: 89636
2009-11-23 00:32:42 +00:00
Oscar Fuentes
0c2443a28d
CMake: generate targets for tools and examples even when
...
LLVM_BUILD_TOOLS or LLVM_BUILD_EXAMPLES are OFF.
llvm-svn: 89635
2009-11-23 00:21:43 +00:00
Daniel Dunbar
fd29d88605
FileCheck, PR5239: Try to find the intended match on failures, but looking for a
...
good nearby fuzzy match. Frequently the input is nearly correct, and just
showing the user the a nearby sensible match is enough to diagnose the problem.
- The "fuzzyness" is pretty simple and arbitrary, but worked on my three test
cases. If you encounter problems, or places you think FileCheck should have
guessed but didn't, please add test cases to PR5239.
For example, previously FileCheck would report this:
--
t.cpp:21:55: error: expected string not found in input
// CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]] %a0)
^
<stdin>:19:30: note: scanning from here
define void @_Z2f15f1_s1(%1) nounwind {
^
<stdin>:19:30: note: with variable "i64_i64_ty" equal to "%0"
--
and now it also reports this:
--
<stdin>:27:1: note: possible intended match here
define void @_Z2f25f2_s1(%0) nounwind {
^
--
which makes it clear that the CHECK just has an extra ' %a0' in it, without
having to check the input.
llvm-svn: 89631
2009-11-22 22:59:26 +00:00
Daniel Dunbar
e0ef65aba4
FileCheck: When a string using variable references fails to match, print
...
additional information about the current definitions of the variables used in
the string.
llvm-svn: 89628
2009-11-22 22:08:06 +00:00
Daniel Dunbar
5a308f5399
SourceMgr: Add ShowLine argument to PrintMessage, to allow suppressing the source line output.
...
llvm-svn: 89627
2009-11-22 22:08:00 +00:00
Daniel Dunbar
57cb733b46
Allow '_' in FileCheck variable names, it is nice to have at least one
...
separate character.
- Chris, OK?
llvm-svn: 89626
2009-11-22 22:07:50 +00:00
Jim Grosbach
bf6d35893f
Add getFrameIndexReference() to TargetRegisterInfo, which allows targets to
...
tell debug info which base register to use to reference a frame index on a
per-index basis. This is useful, for example, in the presence of dynamic
stack realignment when local variables are indexed via the stack pointer and
stack-based arguments via the frame pointer.
llvm-svn: 89620
2009-11-22 20:14:00 +00:00
Jim Grosbach
fd963e11f5
Move default FrameReg val to getFrameIndexReference(). Otherwise, debug info can get bogus values.
...
llvm-svn: 89618
2009-11-22 20:05:32 +00:00
Jim Grosbach
00e9c6103b
80-column cleanup
...
llvm-svn: 89612
2009-11-22 19:20:36 +00:00
Jakob Stoklund Olesen
8a3fdae0aa
Teach MachineBasicBlock::updateTerminator() to handle a failing TII->ReverseBranchCondition(Cond) call.
...
This fixes the MallocBench/cfrac test case regression.
llvm-svn: 89608
2009-11-22 18:28:04 +00:00
Daniel Dunbar
43bff37afb
Update doc re: LLVM_BUILD_EXAMPLES.
...
llvm-svn: 89607
2009-11-22 18:27:51 +00:00
Daniel Dunbar
f606951546
Use ExtractElementInst::Create instead of new; patch by Artur Pietrek!
...
llvm-svn: 89606
2009-11-22 18:27:43 +00:00
Chris Lattner
a13c9d1a5e
add fixme for dubious code. Duncan, what do you think?
...
llvm-svn: 89602
2009-11-22 16:16:48 +00:00
Chris Lattner
db1e9f1290
remove a silly condition that doesn't make a lot of sense anymore.
...
llvm-svn: 89601
2009-11-22 16:15:59 +00:00
Chris Lattner
d6a49ad25a
reduce indentation, no functionality change.
...
llvm-svn: 89600
2009-11-22 16:05:05 +00:00
Chris Lattner
88874ec60a
Remove the AliasAnalysis::getMustAliases method, which is dead.
...
The hasNoModRefInfoForCalls isn't worth it as a filter because
basicaa provides m/r info and everything chains to it, so remove
it.
llvm-svn: 89599
2009-11-22 16:01:44 +00:00
Edward O'Callaghan
f161e97a9e
Miss two, PR5307.
...
llvm-svn: 89596
2009-11-22 15:35:28 +00:00
Edward O'Callaghan
cc856372b0
Convert Thumb2 tests to FileCheck for PR5307.
...
llvm-svn: 89595
2009-11-22 15:18:27 +00:00
Benjamin Kramer
a9268a4525
Turns out stuff gets allocated to different registers depending on the subtarget.
...
llvm-svn: 89594
2009-11-22 15:15:52 +00:00
Edward O'Callaghan
21d7e8aeb1
Convert ARM tests to FileCheck for PR5307.
...
llvm-svn: 89593
2009-11-22 14:23:33 +00:00
Benjamin Kramer
2e245f4e18
Convert test to FileCheck.
...
llvm-svn: 89589
2009-11-22 13:16:36 +00:00
Edward O'Callaghan
8966897524
Forgot to alter RUN line when converting to FileCheck.
...
llvm-svn: 89588
2009-11-22 13:09:48 +00:00
Edward O'Callaghan
7150767800
Fix for bad FileCheck converts in revision 89584.
...
llvm-svn: 89586
2009-11-22 12:50:05 +00:00
Edward O'Callaghan
15dd46215e
Convert a few tests to FileCheck for PR5307.
...
llvm-svn: 89584
2009-11-22 11:45:44 +00:00
Bob Wilson
7248f86432
Fix whitespace.
...
llvm-svn: 89582
2009-11-22 04:24:42 +00:00
Bob Wilson
67e6cab49f
Fix pr5470. Tablegen handles template arguments by temporarily setting their
...
values, resolving references to them, and then removing the definitions.
If a template argument is set to an undefined value, we need to resolve
references to that argument to an explicit undefined value. The current code
leaves the reference to the template argument as it is, which causes an
assertion failure later when the definition of the template argument is
removed.
llvm-svn: 89581
2009-11-22 03:58:57 +00:00
Nick Lewycky
663e0a06b0
Remove dead code. While there, also turn a few 'T* ' into 'T *' to match the
...
rest of the file.
llvm-svn: 89577
2009-11-22 02:38:11 +00:00
Jim Grosbach
90e9062e96
Generate more correct debug info for frame indices.
...
llvm-svn: 89576
2009-11-22 02:32:29 +00:00
Anton Korobeynikov
abdf86d2be
Minor optimization: when doing eq/ne comparions and RHS is a constant - swap operands, this will allow us to fold imm into comparison.
...
llvm-svn: 89574
2009-11-22 01:14:08 +00:00
Anton Korobeynikov
3a31644c7a
Drop unsupported imm operands
...
llvm-svn: 89573
2009-11-22 01:13:54 +00:00
Anton Korobeynikov
a9c7bb724a
Use 2-byte alignment for functions. 4 bytes are clear overkill here.
...
llvm-svn: 89572
2009-11-22 01:13:39 +00:00
Anton Korobeynikov
d099b578e4
Use semicolon as assembler comment string
...
llvm-svn: 89571
2009-11-22 01:12:49 +00:00
Jim Grosbach
e09e95b35c
Revert 89562. We're being sneakier than I was giving us credit for, and this
...
isn't necessary.
llvm-svn: 89568
2009-11-21 23:34:09 +00:00
Jim Grosbach
042483efb1
remove trailing whitespace
...
llvm-svn: 89567
2009-11-21 23:12:12 +00:00
Bob Wilson
159905a766
Fix some spelling in comments.
...
llvm-svn: 89566
2009-11-21 22:44:20 +00:00
Bob Wilson
3b793a4dc9
Avoid a redundant assertion.
...
llvm-svn: 89565
2009-11-21 22:39:27 +00:00
Jim Grosbach
43fd822249
Darwin requires a frame pointer for all non-leaf functions to support correct
...
backtraces.
llvm-svn: 89562
2009-11-21 21:40:08 +00:00
Evan Cheng
a33fc86be3
Add predicate operand to NEON instructions. Fix lots (but not all) 80 col violations in ARMInstrNEON.td.
...
llvm-svn: 89542
2009-11-21 06:21:52 +00:00
Evan Cheng
1f4062f194
Allow target to disable if-converting predicable instructions. e.g. NEON instructions under ARM mode.
...
llvm-svn: 89541
2009-11-21 06:20:26 +00:00
Devang Patel
930143b0dc
Cosmetic changes, which were long overdue, in DwarfDebug.cpp.
...
llvm-svn: 89537
2009-11-21 02:48:08 +00:00
Devang Patel
ed85e12da6
We are not using DBG_STOPPOINT anymore.
...
llvm-svn: 89536
2009-11-21 02:46:55 +00:00
Evan Cheng
960ad9a8ab
Maintain stylistic consistency.
...
llvm-svn: 89535
2009-11-21 02:32:35 +00:00
Jakob Stoklund Olesen
4c83e2c253
Don't leave temporary files in the test directory.
...
llvm-svn: 89531
2009-11-21 02:05:31 +00:00
Jakob Stoklund Olesen
bc630aca39
Be more clever about calculating live variables through new basic blocks.
...
When splitting a critical edge, the registers live through the edge are:
- Used in a PHI instruction, or
- Live out from the predecessor, and
- Live in to the successor.
This allows the coalescer to eliminate even more phi joins.
llvm-svn: 89530
2009-11-21 02:05:21 +00:00
Daniel Dunbar
dbeef0c161
Allow SmallString to implicitly convert to StringRef.
...
llvm-svn: 89529
2009-11-21 02:01:24 +00:00
Eric Christopher
0c7bd96de2
Add more optimizations for object size checking, enable handling of
...
object size intrinsic and verify return type is correct. Collect various
code in one place.
llvm-svn: 89523
2009-11-21 01:01:30 +00:00
Devang Patel
e1bbc33355
Remove dead code.
...
llvm-svn: 89522
2009-11-21 00:54:03 +00:00
Dale Johannesen
b91eba382d
When generating a vector the really slow way, via loads
...
and stores, handle the case where the element size is not
a valid target type correctly (PPC).
llvm-svn: 89521
2009-11-21 00:53:23 +00:00
Devang Patel
92e8c655b2
There is no need to use FoldingSet to unique DIEs.
...
DIEs are created from MDNode, which are already uniqued. And DwarfDebug already uses ValueMaps to find and use existing DIE for a given MDNode.
llvm-svn: 89518
2009-11-21 00:31:03 +00:00
Viktor Kutuzov
7dcca8f7fc
Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.
...
llvm-svn: 89516
2009-11-21 00:00:02 +00:00
David Goodwin
5305dc0be1
Restructure code to allow renaming of multiple-register groups for anti-dep breaking.
...
llvm-svn: 89511
2009-11-20 23:33:54 +00:00
Evan Cheng
73f9a9e2c8
Enable hoisting load from constant memories.
...
llvm-svn: 89510
2009-11-20 23:31:34 +00:00
Dan Gohman
312971513f
Fix a thinko that caused spurious @GOTOFFs.
...
llvm-svn: 89509
2009-11-20 23:30:32 +00:00
Dan Gohman
e14b347176
Update for new getBlockAddress signature.
...
llvm-svn: 89507
2009-11-20 23:21:00 +00:00
Dan Gohman
7a6611793f
Target-independent support for TargetFlags on BlockAddress operands,
...
and support for blockaddresses in x86-32 PIC mode.
llvm-svn: 89506
2009-11-20 23:18:13 +00:00
Sean Callanan
c1f532e930
Recommitting PALIGNR shift width fixes.
...
Thanks to Daniel Dunbar for fixing clang intrinsics:
http://llvm.org/viewvc/llvm-project?view=rev&revision=89499
llvm-svn: 89500
2009-11-20 22:28:42 +00:00
Dale Johannesen
8495a506eb
Remove an incorrect overaggressive optimization
...
(PPC specific).
llvm-svn: 89496
2009-11-20 22:16:40 +00:00
Sean Callanan
19d92728d0
Reverting PALIGNR fix until I figure out how this
...
broke the Clang testsuite.
llvm-svn: 89495
2009-11-20 22:09:28 +00:00
Sean Callanan
fbed130173
Fixed PALIGNR to take 8-bit rotations in all cases.
...
Also fixed the corresponding testcase, and the PALIGNR
intrinsic (tested for correctness with llvm-gcc).
llvm-svn: 89491
2009-11-20 21:40:28 +00:00
Devang Patel
e064ad4741
Do not hold on to a map slot while new entries may be inserted into the map.
...
Use ValueMap, instead of std::map.
llvm-svn: 89490
2009-11-20 21:37:22 +00:00
David Greene
f46c37c0de
Cleanups.
...
Make things a little more efficient as suggested by Evan.
llvm-svn: 89489
2009-11-20 21:13:27 +00:00
Devang Patel
85121a3bda
There is no need to emit source location info for DW_TAG_pointer_type.
...
llvm-svn: 89487
2009-11-20 21:05:37 +00:00
Dan Gohman
fbffe63528
Make Loop::getLoopLatch() work on loops which don't have preheaders, as
...
it may be used in contexts where preheader insertion may have failed due
to an indirectbr.
Make LoopSimplify's LoopSimplify::SeparateNestedLoop properly fail in
the case that it would require splitting an indirectbr edge.
These fix PR5502.
llvm-svn: 89484
2009-11-20 20:51:18 +00:00
Dan Gohman
d15302afa0
Fix IPSCCP's code for deleting dead blocks to tolerate outstanding
...
blockaddress users. This fixes PR5569.
llvm-svn: 89483
2009-11-20 20:19:14 +00:00
Daniel Dunbar
f87c75706f
Revert "Add some rough optimizations for checking routines.", it buildeth not.
...
llvm-svn: 89482
2009-11-20 20:17:30 +00:00
Eric Christopher
cf97d01dff
Add some rough optimizations for checking routines.
...
llvm-svn: 89479
2009-11-20 19:57:37 +00:00
Evan Cheng
bdb43a9d99
Remat VLDRD from constpool. Clean up some instruction property specifications.
...
llvm-svn: 89478
2009-11-20 19:57:15 +00:00
Evan Cheng
b39a9fd3ed
Add option -licm-const-load to hoist all loads from constant memory.
...
llvm-svn: 89477
2009-11-20 19:55:37 +00:00
Jim Grosbach
6c3b71195a
The verify() call of CPEIsInRange() isn't right for the assertion check of
...
constant pool ranges, as CPEIsInRange() makes conservative assumptions about
the potential alignment changes from branch adjustments. The verification,
on the other hand, runs after those branch adjustments are made, so the
effects on alignment are known and already taken into account. The sanity
check in verify should check the range directly instead.
llvm-svn: 89473
2009-11-20 19:37:38 +00:00
Dan Gohman
ff20377740
Use stripPointerCasts(). Thanks Duncan!
...
llvm-svn: 89472
2009-11-20 19:33:16 +00:00
David Goodwin
80a03cc0b1
Remove some old experimental code that is no longer needed. Remove additional, speculative scheduling pass as its cost did not translate into significant performance improvement. Minor tweaks.
...
llvm-svn: 89471
2009-11-20 19:32:48 +00:00