oota-llvm.git
14 years agoTidy whitespace.
Bob Wilson [Fri, 9 Apr 2010 21:38:26 +0000 (21:38 +0000)]
Tidy whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100904 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIf all the bit positions are not specified; do not decode the instructions.
Johnny Chen [Fri, 9 Apr 2010 21:01:02 +0000 (21:01 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100899 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosuck the propagating "has dynamic libs" check into a single makefile
Chris Lattner [Fri, 9 Apr 2010 20:51:47 +0000 (20:51 +0000)]
suck the propagating "has dynamic libs" check into a single makefile
variable TARGET_HAS_DYNAMIC_LIBS

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100896 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd minix support, patch by Kees van Reeuwijk! PR6797
Chris Lattner [Fri, 9 Apr 2010 20:45:04 +0000 (20:45 +0000)]
add minix support, patch by Kees van Reeuwijk!  PR6797

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100895 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoclean this up, fix std::min ambiguity on some platforms.
Chris Lattner [Fri, 9 Apr 2010 20:43:54 +0000 (20:43 +0000)]
clean this up, fix std::min ambiguity on some platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100894 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdding IPSCCP and Internalize passes to the C-bindings
Wesley Peck [Fri, 9 Apr 2010 20:43:20 +0000 (20:43 +0000)]
Adding IPSCCP and Internalize passes to the C-bindings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100893 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProvide versions of the ARM eh_sjlj_setjmp instructions for non-VFP subtargets
Bob Wilson [Fri, 9 Apr 2010 20:41:18 +0000 (20:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100892 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove 'Optional' class from Clang to LLVM/ADT.
Ted Kremenek [Fri, 9 Apr 2010 20:25:54 +0000 (20:25 +0000)]
Move 'Optional' class from Clang to LLVM/ADT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100889 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoARM decoder emitter should print out useful information unconditionally when it
Johnny Chen [Fri, 9 Apr 2010 19:31:33 +0000 (19:31 +0000)]
ARM decoder emitter should print out useful information unconditionally when it
encounters decoding conflicts, instead of wrapping it inside the DEBUG() macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100886 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen emitting code for an add, don't force a SCEVUnknown wrapper around
Dan Gohman [Fri, 9 Apr 2010 19:14:31 +0000 (19:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100884 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen looking for loop-invariant users, look through no-op instructions,
Dan Gohman [Fri, 9 Apr 2010 19:12:34 +0000 (19:12 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100883 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake sure this test tests something.
Benjamin Kramer [Fri, 9 Apr 2010 19:03:31 +0000 (19:03 +0000)]
Make sure this test tests something.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100879 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a grammaro.
Bob Wilson [Fri, 9 Apr 2010 18:39:54 +0000 (18:39 +0000)]
Fix a grammaro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100877 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a testcase for svn r100568.
Bob Wilson [Fri, 9 Apr 2010 18:29:29 +0000 (18:29 +0000)]
Add a testcase for svn r100568.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100876 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago"On SPU, variables in the .bss section that are allocated with the .lcomm directive...
Chris Lattner [Fri, 9 Apr 2010 18:27:03 +0000 (18:27 +0000)]
"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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100875 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a comment.
Dan Gohman [Fri, 9 Apr 2010 18:20:03 +0000 (18:20 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100874 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix up header comments to match the comment fixups I made in r100849.
Bob Wilson [Fri, 9 Apr 2010 16:24:49 +0000 (16:24 +0000)]
Fix up header comments to match the comment fixups I made in r100849.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100869 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClear InsnsBeginScopeSet and InsnsEndScopeSet at the end of function.
Devang Patel [Fri, 9 Apr 2010 16:04:20 +0000 (16:04 +0000)]
Clear InsnsBeginScopeSet and InsnsEndScopeSet at the end of function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100867 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoperformance: cache result of looking up user
Gabor Greif [Fri, 9 Apr 2010 15:18:34 +0000 (15:18 +0000)]
performance: cache result of looking up user

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100862 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMerge a few fast-isel tests.
Dan Gohman [Fri, 9 Apr 2010 15:03:55 +0000 (15:03 +0000)]
Merge a few fast-isel tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100860 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMinor code simplification.
Dan Gohman [Fri, 9 Apr 2010 14:53:59 +0000 (14:53 +0000)]
Minor code simplification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100859 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete this obsolete comment.
Dan Gohman [Fri, 9 Apr 2010 14:12:01 +0000 (14:12 +0000)]
Delete this obsolete comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100858 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoconst-ize a predicate
Gabor Greif [Fri, 9 Apr 2010 10:57:00 +0000 (10:57 +0000)]
const-ize a predicate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100856 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a missing dependency to this library when building with CMake.
Chandler Carruth [Fri, 9 Apr 2010 05:55:25 +0000 (05:55 +0000)]
Add a missing dependency to this library when building with CMake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100852 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse getNumImplicitDefs() and getNumImplicitUses().
Bob Wilson [Fri, 9 Apr 2010 04:46:43 +0000 (04:46 +0000)]
Use getNumImplicitDefs() and getNumImplicitUses().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100850 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix up some comments.
Bob Wilson [Fri, 9 Apr 2010 04:34:03 +0000 (04:34 +0000)]
Fix up some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100849 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert r100842 which broke several of the build bots.
Chris Lattner [Fri, 9 Apr 2010 04:24:20 +0000 (04:24 +0000)]
revert r100842  which broke several of the build bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100848 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agolit: Add support to OneCommandPerFileTest format to take input directory from input...
Daniel Dunbar [Fri, 9 Apr 2010 02:15:10 +0000 (02:15 +0000)]
lit: Add support to OneCommandPerFileTest format to take input directory from input path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100846 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor the code for computing the insertion point for an expression into
Dan Gohman [Fri, 9 Apr 2010 02:00:38 +0000 (02:00 +0000)]
Refactor the code for computing the insertion point for an expression into
a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100845 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded a tester for the enhanced disassembler,
Sean Callanan [Fri, 9 Apr 2010 01:43:16 +0000 (01:43 +0000)]
Added a tester for the enhanced disassembler,
integrated into the llvm-mc testing tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100842 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd several more lint checks.
Dan Gohman [Fri, 9 Apr 2010 01:39:53 +0000 (01:39 +0000)]
Add several more lint checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100841 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a bug in IVUsers which was permitting non-affine addrecs to
Dan Gohman [Fri, 9 Apr 2010 01:22:56 +0000 (01:22 +0000)]
Fix a bug in IVUsers which was permitting non-affine addrecs to
be sent to LSR, which it isn't prepared to handle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100839 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't use reserved identifiers.
Dan Gohman [Fri, 9 Apr 2010 01:19:28 +0000 (01:19 +0000)]
Don't use reserved identifiers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100838 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a SCCP miscompilation that could happen when a
Chris Lattner [Fri, 9 Apr 2010 01:14:31 +0000 (01:14 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100837 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBugfixes for edis. Code to initialize instruction
Sean Callanan [Fri, 9 Apr 2010 00:11:15 +0000 (00:11 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100830 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid allocating a value of zero in a register if the initial formula
Dan Gohman [Thu, 8 Apr 2010 23:36:27 +0000 (23:36 +0000)]
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

14 years agoAdd a few more lint checks.
Dan Gohman [Thu, 8 Apr 2010 23:05:57 +0000 (23:05 +0000)]
Add a few more lint checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100825 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
Dan Gohman [Thu, 8 Apr 2010 23:03:40 +0000 (23:03 +0000)]
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

14 years agodelete a forwarding function.
Chris Lattner [Thu, 8 Apr 2010 21:34:17 +0000 (21:34 +0000)]
delete a forwarding function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100815 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove elf section uniquing to MCContext. Along the way
Chris Lattner [Thu, 8 Apr 2010 21:26:26 +0000 (21:26 +0000)]
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

14 years agoNow that Evan Cheng has fixed the coalescer bug (r100804), the workaround code
Johnny Chen [Thu, 8 Apr 2010 21:23:54 +0000 (21:23 +0000)]
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

14 years agoremove the TargetLoweringObjectFileMachO::getMachoSection
Chris Lattner [Thu, 8 Apr 2010 20:40:11 +0000 (20:40 +0000)]
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

14 years agomove macho section uniquing from MCParser and TLOF to MCContext where
Chris Lattner [Thu, 8 Apr 2010 20:30:37 +0000 (20:30 +0000)]
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

14 years agoCoalescer should not delete copy instructions whose defs are partially dead. e.g.
Evan Cheng [Thu, 8 Apr 2010 20:02:37 +0000 (20:02 +0000)]
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

14 years agoUpdate CMake build.
Ted Kremenek [Thu, 8 Apr 2010 18:52:18 +0000 (18:52 +0000)]
Update CMake build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100802 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix -Wsign-compare warning (issued by clang++).
Ted Kremenek [Thu, 8 Apr 2010 18:49:30 +0000 (18:49 +0000)]
Fix -Wsign-compare warning (issued by clang++).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100799 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a -lint pass which checks for common sources of undefined or likely
Dan Gohman [Thu, 8 Apr 2010 18:47:09 +0000 (18:47 +0000)]
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

14 years agoRename a function.
Devang Patel [Thu, 8 Apr 2010 18:43:56 +0000 (18:43 +0000)]
Rename a function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100797 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplicit defs get added to the end of machine instrs sometimes. Scan the whole instr...
Chris Lattner [Thu, 8 Apr 2010 18:20:52 +0000 (18:20 +0000)]
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

14 years agoPointers to zero-sized objects don't point to overlapping objects.
Dan Gohman [Thu, 8 Apr 2010 18:11:50 +0000 (18:11 +0000)]
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

14 years agoPrint empty structs as {} rather than { }.
Dan Gohman [Thu, 8 Apr 2010 18:03:05 +0000 (18:03 +0000)]
Print empty structs as {} rather than { }.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100787 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a comment.
Dan Gohman [Thu, 8 Apr 2010 17:41:04 +0000 (17:41 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100783 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTouch configure so it regenerates Disassemblers.def to include ARM so
Jeffrey Yasskin [Thu, 8 Apr 2010 17:19:20 +0000 (17:19 +0000)]
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

14 years agoOne instruction may start (or end) multiple lexical scopes.
Devang Patel [Thu, 8 Apr 2010 16:50:29 +0000 (16:50 +0000)]
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

14 years agoclean up algorithm and remove operand order assumptions
Gabor Greif [Thu, 8 Apr 2010 16:46:24 +0000 (16:46 +0000)]
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

14 years agoFix a comment.
Dan Gohman [Thu, 8 Apr 2010 15:57:10 +0000 (15:57 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100774 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead code.
Devang Patel [Thu, 8 Apr 2010 15:48:02 +0000 (15:48 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100771 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete out of date comment.
Devang Patel [Thu, 8 Apr 2010 15:41:13 +0000 (15:41 +0000)]
Delete out of date comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100769 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor.
Devang Patel [Thu, 8 Apr 2010 15:37:09 +0000 (15:37 +0000)]
Refactor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100768 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVarious MSVC warning fixes about truncated 64 bit shifts and const pointers passed...
Benjamin Kramer [Thu, 8 Apr 2010 15:25:57 +0000 (15:25 +0000)]
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

14 years agoProvide operator delete for BumpPtrAllocator and RecyclingAllocator. They will
Benjamin Kramer [Thu, 8 Apr 2010 15:22:35 +0000 (15:22 +0000)]
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

14 years agouse abstract interface in two more places
Gabor Greif [Thu, 8 Apr 2010 13:50:42 +0000 (13:50 +0000)]
use abstract interface in two more places

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100762 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix compile
Gabor Greif [Thu, 8 Apr 2010 13:08:11 +0000 (13:08 +0000)]
fix compile

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100760 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse abstract interface
Gabor Greif [Thu, 8 Apr 2010 12:52:19 +0000 (12:52 +0000)]
use abstract interface

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100758 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse twines to simplify calls to report_fatal_error. For code size and readability.
Benjamin Kramer [Thu, 8 Apr 2010 10:44:28 +0000 (10:44 +0000)]
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

14 years agoUse errs instead of fprintf.
Benjamin Kramer [Thu, 8 Apr 2010 09:42:29 +0000 (09:42 +0000)]
Use errs instead of fprintf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100754 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store...
Evan Cheng [Thu, 8 Apr 2010 07:37:57 +0000 (07:37 +0000)]
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

14 years agoRevert this change from a while ago; ScalarEvolution shouldn't analyze
Dan Gohman [Thu, 8 Apr 2010 05:58:24 +0000 (05:58 +0000)]
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

14 years agoWhen expanding expressions which are using post-inc mode for multiple loops,
Dan Gohman [Thu, 8 Apr 2010 05:57:57 +0000 (05:57 +0000)]
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

14 years agoMake post regalloc machine licm functional. It now passes all of MultiSource.
Evan Cheng [Thu, 8 Apr 2010 01:03:47 +0000 (01:03 +0000)]
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

14 years agotypo
Chris Lattner [Thu, 8 Apr 2010 00:54:34 +0000 (00:54 +0000)]
typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100738 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodocument isvolatile etc.
Chris Lattner [Thu, 8 Apr 2010 00:53:57 +0000 (00:53 +0000)]
document isvolatile etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100737 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agompsadbw is not commutative.
Eric Christopher [Thu, 8 Apr 2010 00:52:02 +0000 (00:52 +0000)]
mpsadbw is not commutative.

Fixes PR3440.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100736 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded support for ARM disassembly to edis.
Sean Callanan [Thu, 8 Apr 2010 00:48:21 +0000 (00:48 +0000)]
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

14 years agoconvert a report_fatal_error that I was able to trigger into a nice error
Chris Lattner [Thu, 8 Apr 2010 00:09:16 +0000 (00:09 +0000)]
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

14 years agoFix typo.
Evan Cheng [Wed, 7 Apr 2010 23:51:38 +0000 (23:51 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100726 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agominor tidying.
Chris Lattner [Wed, 7 Apr 2010 23:50:38 +0000 (23:50 +0000)]
minor tidying.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100725 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse assertions instead of unreachable for logic errors.
Chris Lattner [Wed, 7 Apr 2010 23:47:51 +0000 (23:47 +0000)]
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

14 years agointroduce a new recoverable error handling API to LLVMContext
Chris Lattner [Wed, 7 Apr 2010 23:40:44 +0000 (23:40 +0000)]
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

14 years agoSay bitcast instead of bitconvert.
Dan Gohman [Wed, 7 Apr 2010 23:22:42 +0000 (23:22 +0000)]
Say bitcast instead of bitconvert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100720 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd svn:ignore.
Dan Gohman [Wed, 7 Apr 2010 23:19:41 +0000 (23:19 +0000)]
Add svn:ignore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100719 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename llvm_install_error_handler -> install_fatal_error_handler
Chris Lattner [Wed, 7 Apr 2010 23:12:29 +0000 (23:12 +0000)]
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

14 years agoUpdate CMake build.
Ted Kremenek [Wed, 7 Apr 2010 23:05:23 +0000 (23:05 +0000)]
Update CMake build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100714 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate cmake build.
Benjamin Kramer [Wed, 7 Apr 2010 23:01:37 +0000 (23:01 +0000)]
Update cmake build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100713 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd support for stpncpy_chk.
Eric Christopher [Wed, 7 Apr 2010 23:00:07 +0000 (23:00 +0000)]
Add support for stpncpy_chk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100710 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename llvm::llvm_report_error -> llvm::report_fatal_error
Chris Lattner [Wed, 7 Apr 2010 22:58:41 +0000 (22:58 +0000)]
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

14 years agoadd newlines at end of files.
Chris Lattner [Wed, 7 Apr 2010 22:54:55 +0000 (22:54 +0000)]
add newlines at end of files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100706 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd newlines at the end of files.
Chris Lattner [Wed, 7 Apr 2010 22:53:17 +0000 (22:53 +0000)]
add newlines at the end of files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100705 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove some unneeded errorhandling stuff.
Chris Lattner [Wed, 7 Apr 2010 22:44:07 +0000 (22:44 +0000)]
remove some unneeded errorhandling stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100703 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agominor tidying up
Chris Lattner [Wed, 7 Apr 2010 22:41:29 +0000 (22:41 +0000)]
minor tidying up

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100702 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up
Chris Lattner [Wed, 7 Apr 2010 22:29:10 +0000 (22:29 +0000)]
tidy up

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100700 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGeneralize IVUsers to track arbitrary expressions rather than expressions
Dan Gohman [Wed, 7 Apr 2010 22:27:08 +0000 (22:27 +0000)]
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

14 years agoMissed this one line for the previous checkin to fix build warnings.
Johnny Chen [Wed, 7 Apr 2010 22:21:03 +0000 (22:21 +0000)]
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

14 years agoFixed warnings pointed out by clang.
Johnny Chen [Wed, 7 Apr 2010 22:03:27 +0000 (22:03 +0000)]
Fixed warnings pointed out by clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100696 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed warnings pointed out by clang.
Johnny Chen [Wed, 7 Apr 2010 21:52:48 +0000 (21:52 +0000)]
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

14 years agoFixed a bug where the disassembler would allow an immediate
Sean Callanan [Wed, 7 Apr 2010 21:42:19 +0000 (21:42 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100694 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed 3 warnings pointed out by clang.
Johnny Chen [Wed, 7 Apr 2010 21:23:48 +0000 (21:23 +0000)]
Fixed 3 warnings pointed out by clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100693 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agounXFAIL, arm disassembler was reenabled.
Benjamin Kramer [Wed, 7 Apr 2010 21:19:41 +0000 (21:19 +0000)]
unXFAIL, arm disassembler was reenabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100692 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix typo and correct comment somewhat.
Eric Christopher [Wed, 7 Apr 2010 20:58:16 +0000 (20:58 +0000)]
Fix typo and correct comment somewhat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100691 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-enable ARM/Thumb disassembler and add a workaround for a memcpy() call in
Johnny Chen [Wed, 7 Apr 2010 20:53:12 +0000 (20:53 +0000)]
Re-enable ARM/Thumb disassembler and add a workaround for a memcpy() call in
ARMDecoderEmitter.cpp, with FIXME comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100690 91177308-0d34-0410-b5e6-96231b3b80d8