Commit Graph

59612 Commits

Author SHA1 Message Date
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
Johnny Chen
2d16a67b94 Now that Evan Cheng has fixed the coalescer bug (r100804), the workaround code
to avoid memcpy() call is no longer necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100811 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 21:23:54 +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
Dan Gohman
88ccf742a3 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100783 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 17:41:04 +00:00
Jeffrey Yasskin
ea2212207e Touch configure so it regenerates Disassemblers.def to include ARM so
people stop seeing a broken build in EDDisassembler.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100782 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 17:19:20 +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
Benjamin Kramer
180c3d4edd Provide operator delete for BumpPtrAllocator and RecyclingAllocator. They will
never be called but msvc complains that they're missing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100766 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 15:22:35 +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
Benjamin Kramer
127dc5e615 Use errs instead of fprintf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100754 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 09:42:29 +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
Chris Lattner
ff35c3f0bf typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100738 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:54:34 +00:00
Chris Lattner
9f636de348 document isvolatile etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100737 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:53:57 +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
Evan Cheng
2dbc8bdfe9 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100726 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:51:38 +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
Dan Gohman
613e2af017 Add svn:ignore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100719 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:19:41 +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
d2075586c8 add newlines at the end of files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:53:17 +00:00