Dan Gohman
fa5ad797e3
Re-apply r101000, with a fix: Don't eliminate an icmp which is part of
...
the loop exit test. This usually doesn't come up for a variety of
reasons, but it isn't impossible, so make IndVarSimplify handle it
conservatively.
llvm-svn: 101008
2010-04-12 02:21:50 +00:00
Chris Lattner
3d2a36277e
whether we enable dylibs or not depends on the host, not the target.
...
llvm-svn: 101007
2010-04-12 02:21:38 +00:00
Dan Gohman
c0f1efaf8d
Revert 101000, which is breaking self-host builds.
...
llvm-svn: 101002
2010-04-12 00:17:10 +00:00
Dan Gohman
068b793614
Fix indentation.
...
llvm-svn: 101001
2010-04-11 23:44:58 +00:00
Dan Gohman
af4ab1b681
Teach IndVarSimplify how to eliminate comparisons involving induction
...
variables. For example, with code like this:
for (i=0;i<n;++i)
if (i<n)
x[i] = 0;
IndVarSimplify will now recognize that i is always less than n inside
the loop, and eliminate the if.
llvm-svn: 101000
2010-04-11 23:10:12 +00:00
Dan Gohman
07591698ce
Enhance ScalarEvolution::isKnownPredicate with support for
...
loop conditions which are invariants.
llvm-svn: 100995
2010-04-11 22:16:48 +00:00
Dan Gohman
f7f28511a9
Minor code simplification.
...
llvm-svn: 100994
2010-04-11 22:13:11 +00:00
Dan Gohman
ae4a4148ba
When creating a ConstantRange for [n,UINT_MAX], special case n == 0, because
...
ConstantRange(0, 0) creates an empty range rather than a full one.
llvm-svn: 100993
2010-04-11 22:12:18 +00:00
Dan Gohman
2352dd7ee0
Fix a comment.
...
llvm-svn: 100992
2010-04-11 22:07:56 +00:00
Dan Gohman
008a38b1d6
Add a cast to void to show that the return value is being
...
intentionally ignored.
llvm-svn: 100984
2010-04-11 19:30:19 +00:00
Dan Gohman
7841a6ecd2
Delete a dead check.
...
llvm-svn: 100983
2010-04-11 19:29:41 +00:00
Dan Gohman
2532856704
Delete dead code.
...
llvm-svn: 100981
2010-04-11 19:28:47 +00:00
Dan Gohman
93cd0f1278
Fix a #include.
...
llvm-svn: 100980
2010-04-11 19:27:52 +00:00
Dan Gohman
b50349a979
Rename isLoopGuardedByCond to isLoopEntryGuardedByCond, to emphasise
...
that it's only testing for the entry condition, not full loop-invariant
conditions.
llvm-svn: 100979
2010-04-11 19:27:13 +00:00
Benjamin Kramer
fedd987f4b
utostr isn't going away too soon, try to make it slightly smaller.
...
llvm-svn: 100977
2010-04-11 19:00:03 +00:00
Nick Lewycky
3e24f7e632
Remove dead argument and clean whitespace. No functionality change.
...
llvm-svn: 100954
2010-04-10 23:18:13 +00:00
Chris Lattner
4568ed7893
Implement support for varargs functions without any fixed
...
parameters in the CBE by implicitly adding a fixed argument.
This allows eliminating a work-around from DAE. Patch by
Sylvere Teissier!
llvm-svn: 100944
2010-04-10 19:12:44 +00:00
Daniel Dunbar
4e06a5b8b3
configure: Fix default value for optimize_option, I messed up the test condition
...
in r86005 and unintentionally changed the default from -O3 to -O2.
- It's odd the things automated perf testing turns up! :)
- Also, the configure diff is messed up slightly. It looks like someone either
didn't regenerate configure correctly (or I didn't), or autoconf has some
funnyness in it. Eric, any ideas?
This has been at -O2 for so long, that I am slightly nervous that this change
will uncover miscompiles of LLVM on other systems. If that is the case, I think
we should just set the default universally at -O3, and let developers/vendors
use -O3 if they want it and have tested it.
llvm-svn: 100941
2010-04-10 18:56:24 +00:00
Chris Lattner
9ae28b141f
fix PR6743, a case where we'd delete an instruction before using it
...
in some cases.
llvm-svn: 100937
2010-04-10 18:26:57 +00:00
Chris Lattner
b9801ffcb5
fix PR6760, a missing check in heap SRoA.
...
llvm-svn: 100936
2010-04-10 18:19:22 +00:00
Chris Lattner
f60b74806f
turn an assert into a proper check, fixing crash on invalid here:
...
$ llvm-as t.ll
llvm-as: t.ll:1:6: error: expected 'type' after '='
%0 = = type { i32, float, float, double }
^
PR6810.
llvm-svn: 100934
2010-04-10 18:01:25 +00:00
Chris Lattner
3a747aef96
improve haiku portability, patch by Paul Davey.
...
llvm-svn: 100933
2010-04-10 17:54:51 +00:00
Chris Lattner
2694145e2e
add attributes and module level asm to the ocaml bindings,
...
patch by Patrick Walton!
llvm-svn: 100932
2010-04-10 17:52:58 +00:00
Sean Callanan
a4ae4e7693
Updated the edis build mechanism to allow for builds
...
that do not build some (or all) of the targets that
edis supports.
llvm-svn: 100910
2010-04-10 00:48:10 +00:00
Dan Gohman
70e572e740
Fix a typo and some indentation.
...
llvm-svn: 100908
2010-04-09 22:47:25 +00:00
Dan Gohman
607e02b33a
When determining a canonical insert position, don't climb deeper
...
into adjacent loops. Also, ensure that the insert position is
dominated by the loop latch of any loop in the post-inc set which
has a latch.
llvm-svn: 100906
2010-04-09 22:07:05 +00:00
Bob Wilson
67dd3a4464
Tidy whitespace.
...
llvm-svn: 100904
2010-04-09 21:38:26 +00:00
Johnny Chen
4e8bd58001
If all the bit positions are not specified; do not decode the instructions.
...
We are bound to fail! For proper disassembly, the well-known encoding bits
of the instruction must be fully specified.
This also removes pseudo instructions from considerations of disassembly,
which is a better design and less fragile than the name matchings.
llvm-svn: 100899
2010-04-09 21:01:02 +00:00
Chris Lattner
74e2ef68b9
suck the propagating "has dynamic libs" check into a single makefile
...
variable TARGET_HAS_DYNAMIC_LIBS
llvm-svn: 100896
2010-04-09 20:51:47 +00:00
Chris Lattner
c86cdc7d47
add minix support, patch by Kees van Reeuwijk! PR6797
...
llvm-svn: 100895
2010-04-09 20:45:04 +00:00
Chris Lattner
5c289f217b
clean this up, fix std::min ambiguity on some platforms.
...
llvm-svn: 100894
2010-04-09 20:43:54 +00:00
Wesley Peck
a2ca3fa781
Adding IPSCCP and Internalize passes to the C-bindings
...
llvm-svn: 100893
2010-04-09 20:43:20 +00:00
Bob Wilson
0106063556
Provide versions of the ARM eh_sjlj_setjmp instructions for non-VFP subtargets
...
such that the non-VFP versions have no implicit defs of VFP registers.
If any callee-saved VFP registers are marked as having been defined, the
prologue/epilogue code will try to save and restore them.
Radar 7770432.
llvm-svn: 100892
2010-04-09 20:41:18 +00:00
Ted Kremenek
bfe98e644b
Move 'Optional' class from Clang to LLVM/ADT.
...
llvm-svn: 100889
2010-04-09 20:25:54 +00:00
Johnny Chen
298a122fb4
ARM decoder emitter should print out useful information unconditionally when it
...
encounters decoding conflicts, instead of wrapping it inside the DEBUG() macro.
llvm-svn: 100886
2010-04-09 19:31:33 +00:00
Dan Gohman
3295a6e5bc
When emitting code for an add, don't force a SCEVUnknown wrapper around
...
a hoisted intermediate result if the intermediate result isn't an
Instruction.
llvm-svn: 100884
2010-04-09 19:14:31 +00:00
Dan Gohman
42ec4eb351
When looking for loop-invariant users, look through no-op instructions,
...
so that an unfortunately placed bitcast doesn't pin a value in a
register.
llvm-svn: 100883
2010-04-09 19:12:34 +00:00
Benjamin Kramer
7e4a475929
Make sure this test tests something.
...
llvm-svn: 100879
2010-04-09 19:03:31 +00:00
Bob Wilson
35e856a8ed
Fix a grammaro.
...
llvm-svn: 100877
2010-04-09 18:39:54 +00:00
Bob Wilson
030591320d
Add a testcase for svn r100568.
...
llvm-svn: 100876
2010-04-09 18:29:29 +00:00
Chris Lattner
1ef9826ff8
"On SPU, variables in the .bss section that are allocated with the .lcomm directive are not aligned on 16 byte boundaries. This causes misaligned loads, as the generated assembly assumes this "default" alignment.
...
this patch disables .lcomm in favour of '.local .comm'
Patch by Kalle Raisklia!
llvm-svn: 100875
2010-04-09 18:27:03 +00:00
Dan Gohman
394b624215
Add a comment.
...
llvm-svn: 100874
2010-04-09 18:20:03 +00:00
Bob Wilson
b618912206
Fix up header comments to match the comment fixups I made in r100849.
...
llvm-svn: 100869
2010-04-09 16:24:49 +00:00
Devang Patel
541019ddec
Clear InsnsBeginScopeSet and InsnsEndScopeSet at the end of function.
...
llvm-svn: 100867
2010-04-09 16:04:20 +00:00
Gabor Greif
ef60190a00
performance: cache result of looking up user
...
llvm-svn: 100862
2010-04-09 15:18:34 +00:00
Dan Gohman
d23fa7d90d
Merge a few fast-isel tests.
...
llvm-svn: 100860
2010-04-09 15:03:55 +00:00
Dan Gohman
0a8175d1db
Minor code simplification.
...
llvm-svn: 100859
2010-04-09 14:53:59 +00:00
Dan Gohman
87f8207c97
Delete this obsolete comment.
...
llvm-svn: 100858
2010-04-09 14:12:01 +00:00
Gabor Greif
ce6dd889ec
const-ize a predicate
...
llvm-svn: 100856
2010-04-09 10:57:00 +00:00
Chandler Carruth
825989ab63
Add a missing dependency to this library when building with CMake.
...
llvm-svn: 100852
2010-04-09 05:55:25 +00:00
Bob Wilson
d8eeb12120
Use getNumImplicitDefs() and getNumImplicitUses().
...
llvm-svn: 100850
2010-04-09 04:46:43 +00:00
Bob Wilson
406f270148
Fix up some comments.
...
llvm-svn: 100849
2010-04-09 04:34:03 +00:00
Chris Lattner
55ddc30f07
revert r100842 which broke several of the build bots.
...
llvm-svn: 100848
2010-04-09 04:24:20 +00:00
Daniel Dunbar
c1ba0c96e3
lit: Add support to OneCommandPerFileTest format to take input directory from input path.
...
llvm-svn: 100846
2010-04-09 02:15:10 +00:00
Dan Gohman
d2df643ddb
Refactor the code for computing the insertion point for an expression into
...
a separate function.
llvm-svn: 100845
2010-04-09 02:00:38 +00:00
Sean Callanan
844a7febd3
Added a tester for the enhanced disassembler,
...
integrated into the llvm-mc testing tool.
llvm-svn: 100842
2010-04-09 01:43:16 +00:00
Dan Gohman
9ba08a4631
Add several more lint checks.
...
llvm-svn: 100841
2010-04-09 01:39:53 +00:00
Dan Gohman
ee6451dca1
Fix a bug in IVUsers which was permitting non-affine addrecs to
...
be sent to LSR, which it isn't prepared to handle.
llvm-svn: 100839
2010-04-09 01:22:56 +00:00
Dan Gohman
9c3d160039
Don't use reserved identifiers.
...
llvm-svn: 100838
2010-04-09 01:19:28 +00:00
Chris Lattner
c6c153be45
fix a SCCP miscompilation that could happen when a
...
forced constant is changed to a constant, we would end
up adding the instruction to the wrong worklist,
preventing it from being properly revisited. This fixes
rdar://7832370
llvm-svn: 100837
2010-04-09 01:14:31 +00:00
Sean Callanan
48b1804e79
Bugfixes for edis. Code to initialize instruction
...
state was being executed too lazily, and the LLVM
assembly syntax for the disassembler was not being
written into the proper disassembler state variable.
llvm-svn: 100830
2010-04-09 00:11:15 +00:00
Dan Gohman
9b5d0bb774
Avoid allocating a value of zero in a register if the initial formula
...
inputs happen to negate each other.
llvm-svn: 100828
2010-04-08 23:36:27 +00:00
Dan Gohman
7808d490d3
Add a few more lint checks.
...
llvm-svn: 100825
2010-04-08 23:05:57 +00:00
Dan Gohman
4ce1fb1448
Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
...
llvm-svn: 100824
2010-04-08 23:03:40 +00:00
Chris Lattner
80c345927e
delete a forwarding function.
...
llvm-svn: 100815
2010-04-08 21:34:17 +00:00
Chris Lattner
5418dd5fda
move elf section uniquing to MCContext. Along the way
...
merge XCore's section into MCSectionELF
llvm-svn: 100812
2010-04-08 21:26:26 +00:00
Johnny Chen
75f82345c4
Now that Evan Cheng has fixed the coalescer bug (r100804), the workaround code
...
to avoid memcpy() call is no longer necessary.
llvm-svn: 100811
2010-04-08 21:23:54 +00:00
Chris Lattner
433d40695b
remove the TargetLoweringObjectFileMachO::getMachoSection
...
api and update clients to use MCContext instead.
llvm-svn: 100808
2010-04-08 20:40:11 +00:00
Chris Lattner
2073112fc0
move macho section uniquing from MCParser and TLOF to MCContext where
...
the compiler and asmparser now unique to the same sections. This fixes
rdar://7835021.
llvm-svn: 100807
2010-04-08 20:30:37 +00:00
Evan Cheng
b083c47c21
Coalescer should not delete copy instructions whose defs are partially dead. e.g.
...
%RDI<def,dead> = MOV64rr %RAX<kill>, %EDI<imp-def>
llvm-svn: 100804
2010-04-08 20:02:37 +00:00
Ted Kremenek
7ffb294c5b
Update CMake build.
...
llvm-svn: 100802
2010-04-08 18:52:18 +00:00
Ted Kremenek
d87bd77586
Fix -Wsign-compare warning (issued by clang++).
...
llvm-svn: 100799
2010-04-08 18:49:30 +00:00
Dan Gohman
98bc4371c7
Add a -lint pass which checks for common sources of undefined or likely
...
unintended behavior.
llvm-svn: 100798
2010-04-08 18:47:09 +00:00
Devang Patel
359b013129
Rename a function.
...
llvm-svn: 100797
2010-04-08 18:43:56 +00:00
Chris Lattner
294a90d87a
implicit defs get added to the end of machine instrs sometimes. Scan the whole instruction for the metadata operand instead of assuming it will be at the end of the instruction.
...
llvm-svn: 100792
2010-04-08 18:20:52 +00:00
Dan Gohman
cb45bd9cb3
Pointers to zero-sized objects don't point to overlapping objects.
...
llvm-svn: 100789
2010-04-08 18:11:50 +00:00
Dan Gohman
386e01e879
Print empty structs as {} rather than { }.
...
llvm-svn: 100787
2010-04-08 18:03:05 +00:00
Dan Gohman
b6c29c27da
Fix a comment.
...
llvm-svn: 100783
2010-04-08 17:41:04 +00:00
Jeffrey Yasskin
96f8a4a82f
Touch configure so it regenerates Disassemblers.def to include ARM so
...
people stop seeing a broken build in EDDisassembler.cpp
llvm-svn: 100782
2010-04-08 17:19:20 +00:00
Devang Patel
3ebd8931fb
One instruction may start (or end) multiple lexical scopes.
...
There is no need to remember labels identifying regions marked by such instructions in each scope.
llvm-svn: 100781
2010-04-08 16:50:29 +00:00
Gabor Greif
64d8d1a022
clean up algorithm and remove operand order assumptions
...
llvm-svn: 100780
2010-04-08 16:46:24 +00:00
Dan Gohman
bc048307f3
Fix a comment.
...
llvm-svn: 100774
2010-04-08 15:57:10 +00:00
Devang Patel
2abed283e5
Remove dead code.
...
llvm-svn: 100771
2010-04-08 15:48:02 +00:00
Devang Patel
adfd4df12c
Delete out of date comment.
...
llvm-svn: 100769
2010-04-08 15:41:13 +00:00
Devang Patel
f1d5a1e994
Refactor.
...
llvm-svn: 100768
2010-04-08 15:37:09 +00:00
Benjamin Kramer
53dd088b58
Various MSVC warning fixes about truncated 64 bit shifts and const pointers passed to free.
...
llvm-svn: 100767
2010-04-08 15:25:57 +00:00
Benjamin Kramer
a1eafb9afd
Provide operator delete for BumpPtrAllocator and RecyclingAllocator. They will
...
never be called but msvc complains that they're missing.
llvm-svn: 100766
2010-04-08 15:22:35 +00:00
Gabor Greif
c6a6d39289
use abstract interface in two more places
...
llvm-svn: 100762
2010-04-08 13:50:42 +00:00
Gabor Greif
1c73242012
fix compile
...
llvm-svn: 100760
2010-04-08 13:08:11 +00:00
Gabor Greif
11e7b32e4e
use abstract interface
...
llvm-svn: 100758
2010-04-08 12:52:19 +00:00
Benjamin Kramer
a6769269f3
Use twines to simplify calls to report_fatal_error. For code size and readability.
...
llvm-svn: 100756
2010-04-08 10:44:28 +00:00
Benjamin Kramer
634d9ff7c0
Use errs instead of fprintf.
...
llvm-svn: 100754
2010-04-08 09:42:29 +00:00
Evan Cheng
ebe47c872f
Avoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store of immediates.
...
llvm-svn: 100751
2010-04-08 07:37:57 +00:00
Dan Gohman
883105485b
Revert this change from a while ago; ScalarEvolution shouldn't analyze
...
undef as 0, since it can't force other analyses to intepret the undef
in the same way.
llvm-svn: 100749
2010-04-08 05:58:24 +00:00
Dan Gohman
4506539d84
When expanding expressions which are using post-inc mode for multiple loops,
...
ensure that the expansion is dominated by the increments of those loops.
llvm-svn: 100748
2010-04-08 05:57:57 +00:00
Evan Cheng
058b9f04e8
Make post regalloc machine licm functional. It now passes all of MultiSource.
...
llvm-svn: 100742
2010-04-08 01:03:47 +00:00
Chris Lattner
685db9d59e
typo
...
llvm-svn: 100738
2010-04-08 00:54:34 +00:00
Chris Lattner
bd4ca62c80
document isvolatile etc.
...
llvm-svn: 100737
2010-04-08 00:53:57 +00:00
Eric Christopher
c0f63cf7a9
mpsadbw is not commutative.
...
Fixes PR3440.
llvm-svn: 100736
2010-04-08 00:52:02 +00:00
Sean Callanan
03549ee5af
Added support for ARM disassembly to edis.
...
I also added a rule to the ARM target's Makefile to
build the ARM-specific instruction information table
for the enhanced disassembler.
I will add the test harness for all this stuff in
a separate commit.
llvm-svn: 100735
2010-04-08 00:48:21 +00:00
Chris Lattner
3c65a8324d
convert a report_fatal_error that I was able to trigger into a nice error
...
so the user at least knows what inline asm is a problem. For example:
error: inline asm not supported yet: don't know how to handle tied indirect register inputs
pr8788-1.c:14:10: note: generated from here
asm ("\n" : "+r" (stack->regs)
^
Instead of:
fatal error: error in backend: Don't know how to handle tied indirect register inputs yet!
llvm-svn: 100731
2010-04-08 00:09:16 +00:00
Evan Cheng
81fd35fd76
Fix typo.
...
llvm-svn: 100726
2010-04-07 23:51:38 +00:00
Chris Lattner
94ef52824b
minor tidying.
...
llvm-svn: 100725
2010-04-07 23:50:38 +00:00
Chris Lattner
cd92718a0f
use assertions instead of unreachable for logic errors.
...
llvm-svn: 100724
2010-04-07 23:47:51 +00:00
Chris Lattner
1e45789ee0
introduce a new recoverable error handling API to LLVMContext
...
and use it in one place in inline asm handling stuff. Before
we'd generate this for an invalid modifier letter:
$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl ${0:Z}'
INLINEASM <es:abc incl ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>
Now we generate this:
$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl ${0:Z}'
asm.c:3:12: note: generated from here
__asm__ ("incl %Z0" : "+r" (X));
^
1 error generated.
This is much better but still admittedly not great ("why" is the operand
invalid??), codegen should try harder with its diagnostics :)
llvm-svn: 100723
2010-04-07 23:40:44 +00:00
Dan Gohman
eb7111b98f
Say bitcast instead of bitconvert.
...
llvm-svn: 100720
2010-04-07 23:22:42 +00:00
Chris Lattner
59c5753174
rename llvm_install_error_handler -> install_fatal_error_handler
...
and friends.
llvm-svn: 100717
2010-04-07 23:12:29 +00:00
Ted Kremenek
4b1b4205ed
Update CMake build.
...
llvm-svn: 100714
2010-04-07 23:05:23 +00:00
Benjamin Kramer
33f6413c58
Update cmake build.
...
llvm-svn: 100713
2010-04-07 23:01:37 +00:00
Eric Christopher
e8b281c3c3
Add support for stpncpy_chk.
...
llvm-svn: 100710
2010-04-07 23:00:07 +00:00
Chris Lattner
2104b8d36e
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
5109d3e55d
add newlines at end of files.
...
llvm-svn: 100706
2010-04-07 22:54:55 +00:00
Chris Lattner
3ae2dd2ba5
add newlines at the end of files.
...
llvm-svn: 100705
2010-04-07 22:53:17 +00:00
Chris Lattner
cc7bb24fe2
remove some unneeded errorhandling stuff.
...
llvm-svn: 100703
2010-04-07 22:44:07 +00:00
Chris Lattner
b6166b372e
minor tidying up
...
llvm-svn: 100702
2010-04-07 22:41:29 +00:00
Chris Lattner
b50e795369
tidy up
...
llvm-svn: 100700
2010-04-07 22:29:10 +00:00
Dan Gohman
d006ab90dd
Generalize IVUsers to track arbitrary expressions rather than expressions
...
explicitly split into stride-and-offset pairs. Also, add the
ability to track multiple post-increment loops on the same expression.
This refines the concept of "normalizing" SCEV expressions used for
to post-increment uses, and introduces a dedicated utility routine for
normalizing and denormalizing expressions.
This fixes the expansion of expressions which are post-increment users
of more than one loop at a time. More broadly, this takes LSR another
step closer to being able to reason about more than one loop at a time.
llvm-svn: 100699
2010-04-07 22:27:08 +00:00
Johnny Chen
85ce9f4f30
Missed this one line for the previous checkin to fix build warnings.
...
llvm-svn: 100697
2010-04-07 22:21:03 +00:00
Johnny Chen
8b04b550df
Fixed warnings pointed out by clang.
...
llvm-svn: 100696
2010-04-07 22:03:27 +00:00
Johnny Chen
80f8c3d533
Fixed warnings pointed out by clang.
...
Next to work on is ARMDisassemblerCore.cpp.
llvm-svn: 100695
2010-04-07 21:52:48 +00:00
Sean Callanan
1efe661b46
Fixed a bug where the disassembler would allow an immediate
...
argument that had to be between 0 and 7 to have any value,
firing an assert later in the AsmPrinter. Now, the
disassembler rejects instructions with out-of-range values
for that immediate.
llvm-svn: 100694
2010-04-07 21:42:19 +00:00
Johnny Chen
3f253e2cb1
Fixed 3 warnings pointed out by clang.
...
llvm-svn: 100693
2010-04-07 21:23:48 +00:00
Benjamin Kramer
f812ff6f2e
unXFAIL, arm disassembler was reenabled.
...
llvm-svn: 100692
2010-04-07 21:19:41 +00:00
Eric Christopher
978d33a937
Fix typo and correct comment somewhat.
...
llvm-svn: 100691
2010-04-07 20:58:16 +00:00
Johnny Chen
4e2f8722c4
Re-enable ARM/Thumb disassembler and add a workaround for a memcpy() call in
...
ARMDecoderEmitter.cpp, with FIXME comment.
llvm-svn: 100690
2010-04-07 20:53:12 +00:00
Dale Johannesen
f118f9788b
Split big test into multiple directories to cater to
...
those who don't build all targets.
llvm-svn: 100688
2010-04-07 20:43:35 +00:00
Sean Callanan
643a55708f
Added an AsmLexer for the ARM target, which uses
...
a simple mapping of register names to IDs to
identify register tokens.
llvm-svn: 100685
2010-04-07 20:29:34 +00:00
Dale Johannesen
27c786bcf9
Test that DEBUG_VALUE comments come out on a variety of targets.
...
llvm-svn: 100682
2010-04-07 20:01:24 +00:00
Dale Johannesen
60b289709e
Educate GetInstrSizeInBytes implementations that
...
DBG_VALUE does not generate code.
llvm-svn: 100681
2010-04-07 19:51:44 +00:00
Gabor Greif
08d85da6cc
fix 80-col violations
...
llvm-svn: 100677
2010-04-07 18:59:26 +00:00
Anton Korobeynikov
6e01726eae
Remove late ARM codegen optimization pass committed by accident.
...
It is not ready for public yet.
llvm-svn: 100673
2010-04-07 18:23:27 +00:00
Anton Korobeynikov
090323aee5
Split A8/A9 itins - they already were too big.
...
llvm-svn: 100672
2010-04-07 18:22:11 +00:00
Anton Korobeynikov
32457d6c5e
Add some crude itin approximation for VFP load / stores on A9
...
llvm-svn: 100671
2010-04-07 18:22:03 +00:00
Anton Korobeynikov
d351104f19
Add some crude approximation for neon load/store instructions
...
llvm-svn: 100670
2010-04-07 18:21:58 +00:00
Anton Korobeynikov
4acfad7c1b
Add some A8-based approximation for instructions with unknown cycle times
...
llvm-svn: 100669
2010-04-07 18:21:52 +00:00
Anton Korobeynikov
4fb6a66c8f
Move NEON-VFP domain fixer upper, so post-RA scheduler would benefit from it.
...
llvm-svn: 100668
2010-04-07 18:21:46 +00:00
Anton Korobeynikov
982f0ceaf8
Since tblgen bug was fixed (thanks Jakob!) we don't need InstrStage2 hack anymore.
...
llvm-svn: 100667
2010-04-07 18:21:41 +00:00
Anton Korobeynikov
4050d69dcf
Fix A8 FP NEON MAC itins
...
llvm-svn: 100666
2010-04-07 18:21:33 +00:00
Anton Korobeynikov
9ff2f8f7a5
A9 NEON FP itins
...
llvm-svn: 100665
2010-04-07 18:21:27 +00:00
Anton Korobeynikov
03b317a286
Some permute goodness for A9
...
llvm-svn: 100664
2010-04-07 18:21:22 +00:00
Anton Korobeynikov
7ab31047a7
More shift itins for A9
...
llvm-svn: 100663
2010-04-07 18:21:16 +00:00
Anton Korobeynikov
4d36f8890f
More fixes for itins
...
llvm-svn: 100662
2010-04-07 18:21:10 +00:00
Anton Korobeynikov
ceb54d5ab0
Fix invalid itins for 32-bit varians of VMLAL and friends
...
llvm-svn: 100661
2010-04-07 18:21:04 +00:00
Anton Korobeynikov
f64c7ca5c3
Add MAC stuff for A9
...
llvm-svn: 100660
2010-04-07 18:20:58 +00:00
Anton Korobeynikov
2ef0a12fa1
Fix invalid NEON MAC itins on A8
...
llvm-svn: 100659
2010-04-07 18:20:53 +00:00
Anton Korobeynikov
5e208dc21b
Fix itins for VPAL
...
llvm-svn: 100658
2010-04-07 18:20:47 +00:00
Anton Korobeynikov
a248becd6c
Fix itins for VABA
...
llvm-svn: 100657
2010-04-07 18:20:42 +00:00
Anton Korobeynikov
a3e4989ad8
Correct VMVN itinerary: operand is read in the second cycle, not in the first.
...
llvm-svn: 100656
2010-04-07 18:20:36 +00:00
Anton Korobeynikov
140a65ce0b
More A9 itineraries
...
llvm-svn: 100655
2010-04-07 18:20:29 +00:00
Anton Korobeynikov
1a1af5a830
Correct itinerary class for VPADD
...
llvm-svn: 100654
2010-04-07 18:20:24 +00:00
Anton Korobeynikov
4650fd5fc6
VP{MAX, MIN} are of IIC_VSUBi4D itin class as well.
...
llvm-svn: 100653
2010-04-07 18:20:18 +00:00
Anton Korobeynikov
7d4fad5942
VHADD differs from VHSUB at least on A9 - the former reads both operands in the second cycle, while the latter reads second operand in first cycle. Introduce new itin classes to catch this behavior. Whether this is true for A8 as well is WIP.
...
llvm-svn: 100652
2010-04-07 18:20:13 +00:00
Anton Korobeynikov
2cba05bbe1
Some easy NEON scheduling goodness for A9
...
llvm-svn: 100651
2010-04-07 18:20:07 +00:00
Anton Korobeynikov
2063705d91
Define new itin classes for ARM <-> VFP reg moves to distinguish from NEON ops. Define proper scheduling itinerary for them on A9. A8 TRM does not specify latency for them at all :(
...
llvm-svn: 100650
2010-04-07 18:20:02 +00:00
Anton Korobeynikov
c1e7a6feac
FCONST{S,D} behaves the same way as FP unary instructions. This is true for both A8 and A9.
...
llvm-svn: 100649
2010-04-07 18:19:56 +00:00
Anton Korobeynikov
dad973334b
Proper cycle times for locks, since wbck latency can be larger than fwd latency.
...
llvm-svn: 100648
2010-04-07 18:19:51 +00:00
Anton Korobeynikov
4c1da0f82a
Add new itin classes for FP16 <-> FP32 conversions and make uise of them for A9.
...
llvm-svn: 100647
2010-04-07 18:19:46 +00:00
Anton Korobeynikov
baeb210be7
Make use of new reserved/required scheduling stuff: introduce VFP and NEON locks to model domain cross stalls precisly.
...
llvm-svn: 100646
2010-04-07 18:19:40 +00:00
Anton Korobeynikov
0bdc6345e8
Initial support for different kinds of FU reservation.
...
llvm-svn: 100645
2010-04-07 18:19:32 +00:00
Anton Korobeynikov
9a348a9572
Factor out scoreboard into separate class. This way we might have several different score boards.
...
llvm-svn: 100644
2010-04-07 18:19:24 +00:00
Anton Korobeynikov
15ccae2a46
Some bits of A9 scheduling: VFP
...
llvm-svn: 100643
2010-04-07 18:19:18 +00:00
Anton Korobeynikov
10fc6e9650
Separate const from non-const stuff during mergeing
...
llvm-svn: 100642
2010-04-07 18:19:13 +00:00
Anton Korobeynikov
0453de0133
Some initial version of global merger
...
llvm-svn: 100641
2010-04-07 18:19:07 +00:00
Anton Korobeynikov
fed8ee7dfc
Add hook to insert late LLVM=>LLVM passes just before isel
...
llvm-svn: 100640
2010-04-07 18:18:42 +00:00
Chris Lattner
6855d62768
fix 80 col violation, patch by Alastair Lynn
...
llvm-svn: 100639
2010-04-07 18:13:33 +00:00
Chris Lattner
29233c0458
add a comment line that got dropped
...
llvm-svn: 100638
2010-04-07 18:10:38 +00:00
Chris Lattner
2c88f8a8c4
this has a pr!
...
llvm-svn: 100637
2010-04-07 18:04:56 +00:00
Chris Lattner
f839ee0c13
fix a latent bug my inline asm stuff exposed:
...
MachineOperand::isIdenticalTo wasn't handling metadata operands.
llvm-svn: 100636
2010-04-07 18:03:19 +00:00
Benjamin Kramer
f2351a7a6e
Remove unused method.
...
llvm-svn: 100620
2010-04-07 11:23:46 +00:00
Torok Edwin
f8dba24a9b
Workaround the breakage in r100616 by guarding all timers with
...
TimePassesIsEnabled. This should allow make check to pass.
llvm-svn: 100618
2010-04-07 10:44:46 +00:00
Bill Wendling
fcc14141c7
Use the "NamedGroupTimer" class to categorize DWARF emission better.
...
llvm-svn: 100616
2010-04-07 09:28:04 +00:00
Benjamin Kramer
43c275fa56
Use raw_ostream.
...
llvm-svn: 100615
2010-04-07 09:26:51 +00:00
Sanjiv Gupta
4948793041
Remove XFAIL for vg_leak as the leaks are fixed by 100601.
...
llvm-svn: 100612
2010-04-07 07:06:48 +00:00
Mon P Wang
508127b5fd
Update langref for memcpy, memmove, and memset
...
llvm-svn: 100611
2010-04-07 06:35:53 +00:00
Evan Cheng
5ed679282b
Add comments for missed opportunities.
...
llvm-svn: 100610
2010-04-07 06:00:33 +00:00
Evan Cheng
fcbcc0bd51
Fix typo.
...
llvm-svn: 100609
2010-04-07 05:59:12 +00:00
Chris Lattner
51065568cd
Have the inst emitter add the !srcloc mdnode to the machine instr.
...
Have the asmprinter use the mdnode to scavenge a source location if
present. Document this nonsense in langref.
llvm-svn: 100607
2010-04-07 05:38:05 +00:00
Chris Lattner
d62adaa54d
remove another magic number.
...
llvm-svn: 100606
2010-04-07 05:27:36 +00:00
Chris Lattner
3b9f02a2aa
Three changes:
...
1. Introduce some enums and accessors in the InlineAsm class
that eliminate a ton of magic numbers when handling inline
asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
metadata, propagating it to the instruction emitter, which
drops it.
No functionality change.
llvm-svn: 100605
2010-04-07 05:20:54 +00:00
Chris Lattner
2e664bd915
fix a crash on invalid metadata, e.g.: call i32 @foo(), XXXX
...
We would return the error without inserting the new instruction
into the program, so it wouldn't get deallocated, and an abort
would trigger when the module was deleted.
llvm-svn: 100602
2010-04-07 04:08:57 +00:00
Sanjiv Gupta
dd1c82141c
Fix memory leaks for external symbol name strings.
...
llvm-svn: 100601
2010-04-07 03:36:01 +00:00
John McCall
6ac5cc973c
Clean up some signedness oddities in this code noticed by clang.
...
llvm-svn: 100599
2010-04-07 01:49:15 +00:00
Dale Johannesen
5d7f0a0fdd
Move printing of target-indepedent DEBUG_VALUE comments
...
into AsmPrinter. Target-dependent form is still generated
by FastISel and still handled in X86 code.
llvm-svn: 100596
2010-04-07 01:15:14 +00:00
Evan Cheng
6ea5949a93
Post regalloc LICM. Work in progress.
...
llvm-svn: 100592
2010-04-07 00:41:17 +00:00
Devang Patel
019922d1b0
Do not emit specification DIE with DW_AT_specification attribute for member functions of a funcation local class. This trips gdb's partial scan of DIEs at load time. Fixes Radar 7833483.
...
llvm-svn: 100586
2010-04-06 23:53:48 +00:00
Jakob Stoklund Olesen
20ea258a09
Let that which does not matter truly slide.
...
This test only cares about alignment, so don't test for other cruft.
An upcoming llvm-gcc patch needs this.
llvm-svn: 100584
2010-04-06 23:44:44 +00:00
John McCall
796583eec0
Fix a number of clang -Wsign-compare warnings that didn't have an obvious
...
solution. The only reason these don't fire with gcc-4.2 is that gcc turns off
part of -Wsign-compare in C++ on accident.
llvm-svn: 100581
2010-04-06 23:35:53 +00:00
Dale Johannesen
b36c70913b
Revert 100573, it's causing some testsuite problems.
...
llvm-svn: 100578
2010-04-06 22:45:26 +00:00
Dale Johannesen
85b35b6214
Move printing of DEBUG_VALUE comments to target-independent place.
...
There is probably a more elegant way to do this.
llvm-svn: 100573
2010-04-06 22:21:07 +00:00
Bob Wilson
5202269dc4
Expand SELECT and SELECT_CC for NEON vector types.
...
Radar 7770501.
llvm-svn: 100568
2010-04-06 22:02:24 +00:00
Dale Johannesen
d1976e35c4
Allow for the possibility that a debug-value points
...
to a SDNode that didn't have code generated for it.
llvm-svn: 100566
2010-04-06 21:59:56 +00:00
Stuart Hastings
4bd3dd956f
Reverting 100530 & 100531 due to regressions in the GDB test suite.
...
llvm-svn: 100563
2010-04-06 21:38:29 +00:00
Jim Grosbach
4dac890600
Fix PR6696 and PR6663
...
When a frame pointer is not otherwise required, and dynamic stack alignment
is necessary solely due to the spilling of a register with larger alignment
requirements than the default stack alignment, the frame pointer can be both
used as a general purpose register and a frame pointer. That goes poorly, for
obvious reasons. This patch brings back a bit of old logic for identifying
the use of such registers and conservatively reserves the frame pointer
during register allocation in such cases.
For now, implement for X86 only since it's 32-bit linux which is hitting this,
and we want a targeted fix for 2.7. As a follow-on, this will be expanded
to handle other targets, as theoretically the problem could arise elsewhere
as well.
llvm-svn: 100559
2010-04-06 20:26:37 +00:00
Bill Wendling
167dffdb69
Make this hack more specific to the Apple gcc 4.2 non-LLVM compiler.
...
llvm-svn: 100556
2010-04-06 20:07:21 +00:00
Jakob Stoklund Olesen
41051a0bfe
Don't try to collapse DomainValues onto an incompatible SSE domain.
...
This fixes the Bullet regression on i386/nocona.
llvm-svn: 100553
2010-04-06 19:48:56 +00:00
Gabor Greif
df323a51f5
performance: get rid of repeated dereferencing of use_iterator by caching its result
...
llvm-svn: 100550
2010-04-06 19:32:30 +00:00
Gabor Greif
679728790b
make more two predicates constant
...
llvm-svn: 100549
2010-04-06 19:24:18 +00:00
Gabor Greif
08355d6cda
performance: get rid of repeated dereferencing of use_iterator by caching its result
...
llvm-svn: 100547
2010-04-06 19:14:05 +00:00
Gabor Greif
a21bc0fbd5
const-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobal
...
llvm-svn: 100546
2010-04-06 18:58:22 +00:00
Gabor Greif
0439789023
use CallSite to access calls vs. invokes uniformly
...
and remove assumptions about operand order
llvm-svn: 100544
2010-04-06 18:45:08 +00:00