Commit Graph

37797 Commits

Author SHA1 Message Date
Dan Gohman
e60bb15982 Avoid allocating a value of zero in a register if the initial formula
inputs happen to negate each other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100828 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 23:36:27 +00:00
Dan Gohman
dd98c4d185 Add a few more lint checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100825 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 23:05:57 +00:00
Dan Gohman
e056781323 Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100824 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 23:03:40 +00:00
Chris Lattner
287df1bc03 delete a forwarding function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100815 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 21:34:17 +00:00
Chris Lattner
74aae4726a move elf section uniquing to MCContext. Along the way
merge XCore's section into MCSectionELF


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100812 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 21:26:26 +00:00
Chris Lattner
22772214de remove the TargetLoweringObjectFileMachO::getMachoSection
api and update clients to use MCContext instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100808 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:40:11 +00:00
Chris Lattner
f0559e4b24 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:30:37 +00:00
Evan Cheng
a57fabe815 Coalescer should not delete copy instructions whose defs are partially dead. e.g.
%RDI<def,dead> = MOV64rr %RAX<kill>, %EDI<imp-def>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100804 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 20:02:37 +00:00
Ted Kremenek
b8db3c2c50 Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100802 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:52:18 +00:00
Ted Kremenek
d0e88f3596 Fix -Wsign-compare warning (issued by clang++).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100799 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:49:30 +00:00
Dan Gohman
113902e9fb Add a -lint pass which checks for common sources of undefined or likely
unintended behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100798 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:47:09 +00:00
Devang Patel
e37b0c6c25 Rename a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100797 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:43:56 +00:00
Chris Lattner
d0024fec25 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100792 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:20:52 +00:00
Dan Gohman
b57b6f1575 Pointers to zero-sized objects don't point to overlapping objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100789 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:11:50 +00:00
Dan Gohman
29e13e0c18 Print empty structs as {} rather than { }.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 18:03:05 +00:00
Devang Patel
1c246358a0 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 16:50:29 +00:00
Gabor Greif
fcf0f082f4 clean up algorithm and remove operand order assumptions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100780 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 16:46:24 +00:00
Dan Gohman
bcf9f00ed5 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:57:10 +00:00
Devang Patel
6a5975f49f Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100771 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:48:02 +00:00
Devang Patel
6669b81203 Delete out of date comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:41:13 +00:00
Devang Patel
6122a4d1c0 Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100768 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:37:09 +00:00
Benjamin Kramer
454c4ce479 Various MSVC warning fixes about truncated 64 bit shifts and const pointers passed to free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100767 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:25:57 +00:00
Gabor Greif
f042f97d7e use abstract interface in two more places
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 13:50:42 +00:00
Gabor Greif
e964af6ff8 fix compile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 13:08:11 +00:00
Gabor Greif
2fa16e7083 use abstract interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100758 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 12:52:19 +00:00
Benjamin Kramer
1bd7335a17 Use twines to simplify calls to report_fatal_error. For code size and readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100756 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 10:44:28 +00:00
Evan Cheng
c3b0c341e7 Avoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store of immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100751 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 07:37:57 +00:00
Dan Gohman
8ef5caa80a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 05:58:24 +00:00
Dan Gohman
701a4aef7f When expanding expressions which are using post-inc mode for multiple loops,
ensure that the expansion is dominated by the increments of those loops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100748 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 05:57:57 +00:00
Evan Cheng
4038f9c21b Make post regalloc machine licm functional. It now passes all of MultiSource.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100742 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 01:03:47 +00:00
Eric Christopher
419e223f5d mpsadbw is not commutative.
Fixes PR3440.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100736 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:52:02 +00:00
Sean Callanan
8f993b8c24 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:48:21 +00:00
Chris Lattner
6129c37693 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!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100731 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:09:16 +00:00
Chris Lattner
87d677c185 minor tidying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100725 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:50:38 +00:00
Chris Lattner
35a389344d use assertions instead of unreachable for logic errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100724 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:47:51 +00:00
Chris Lattner
38686bdffd 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 :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:40:44 +00:00
Dan Gohman
a5ced590c9 Say bitcast instead of bitconvert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100720 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:22:42 +00:00
Chris Lattner
b0094c2404 rename llvm_install_error_handler -> install_fatal_error_handler
and friends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100717 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:12:29 +00:00
Ted Kremenek
28e830d25f Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100714 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:05:23 +00:00
Benjamin Kramer
da6379242c Update cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100713 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:01:37 +00:00
Eric Christopher
71988f1e5b Add support for stpncpy_chk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:00:07 +00:00
Chris Lattner
75361b69f3 rename llvm::llvm_report_error -> llvm::report_fatal_error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:58:41 +00:00
Chris Lattner
e3a601b648 add newlines at end of files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:54:55 +00:00
Chris Lattner
1ca6531e2e remove some unneeded errorhandling stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:44:07 +00:00
Chris Lattner
f88c856a47 minor tidying up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100702 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:41:29 +00:00
Chris Lattner
00d139064e tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:29:10 +00:00
Dan Gohman
448db1cdef 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:27:08 +00:00
Johnny Chen
b72e59e361 Missed this one line for the previous checkin to fix build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:21:03 +00:00
Johnny Chen
efd518e1fd Fixed warnings pointed out by clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:03:27 +00:00
Johnny Chen
7e4823c51f Fixed warnings pointed out by clang.
Next to work on is ARMDisassemblerCore.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 21:52:48 +00:00