oota-llvm.git
11 years agoFix predicate HasStandardEncoding in MipsInstrInfo.td per suggestion of
Akira Hatanaka [Fri, 25 May 2012 22:15:15 +0000 (22:15 +0000)]
Fix predicate HasStandardEncoding in MipsInstrInfo.td per suggestion of
Benjamin Kramer.

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

11 years agoSmall code cleanup. No functionality change.
Bill Wendling [Fri, 25 May 2012 21:57:59 +0000 (21:57 +0000)]
Small code cleanup. No functionality change.

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

11 years agoOpen in read/write mode, creating the file if it doesn't exist.
Bill Wendling [Fri, 25 May 2012 21:55:06 +0000 (21:55 +0000)]
Open in read/write mode, creating the file if it doesn't exist.

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

11 years agobounds checking: add support for byval arguments
Nuno Lopes [Fri, 25 May 2012 21:15:17 +0000 (21:15 +0000)]
bounds checking: add support for byval arguments

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

11 years agoDelete MipsExpandPseudo.cpp.
Akira Hatanaka [Fri, 25 May 2012 20:54:48 +0000 (20:54 +0000)]
Delete MipsExpandPseudo.cpp.

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

11 years agoMove the code in MipsExpandPseudo to MipsInstrInfo::expandPostRAPseudo.
Akira Hatanaka [Fri, 25 May 2012 20:52:52 +0000 (20:52 +0000)]
Move the code in MipsExpandPseudo to MipsInstrInfo::expandPostRAPseudo.
Delete MipsExpandPseudo.

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

11 years agoRemove the code that expands MIPS' .cpload directive.
Akira Hatanaka [Fri, 25 May 2012 20:46:52 +0000 (20:46 +0000)]
Remove the code that expands MIPS' .cpload directive.

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

11 years agoRemove the code that emits MIPS' .cprestore directive.
Akira Hatanaka [Fri, 25 May 2012 20:42:55 +0000 (20:42 +0000)]
Remove the code that emits MIPS' .cprestore directive.

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

11 years agoRemove pseudo instructions that are no longer used.
Akira Hatanaka [Fri, 25 May 2012 20:37:40 +0000 (20:37 +0000)]
Remove pseudo instructions that are no longer used.

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

11 years ago[NVPTX] Add a new test case for the newly-enabled call handling
Justin Holewinski [Fri, 25 May 2012 17:20:38 +0000 (17:20 +0000)]
[NVPTX] Add a new test case for the newly-enabled call handling

NV_CONTRIB

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

11 years agoboundschecking:
Nuno Lopes [Fri, 25 May 2012 16:54:04 +0000 (16:54 +0000)]
boundschecking:
add support for select
add experimental support for alloc_size metadata

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

11 years agoChange interface for TargetLowering::LowerCallTo and TargetLowering::LowerCall
Justin Holewinski [Fri, 25 May 2012 16:35:28 +0000 (16:35 +0000)]
Change interface for TargetLowering::LowerCallTo and TargetLowering::LowerCall
to pass around a struct instead of a large set of individual values.  This
cleans up the interface and allows more information to be added to the struct
for future targets without requiring changes to each and every target.

NV_CONTRIB

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

11 years agotest/CodeGen/X86/bigstructret.ll: Suppress one test. It is msvc-incompatible. (compat...
NAKAMURA Takumi [Fri, 25 May 2012 15:40:54 +0000 (15:40 +0000)]
test/CodeGen/X86/bigstructret.ll: Suppress one test. It is msvc-incompatible. (compatible to mingw32 and netbsd, though)

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

11 years agotest/CodeGen/X86/bigstructret.ll: Relax stack offsets for hosts of stack-align=8...
NAKAMURA Takumi [Fri, 25 May 2012 15:12:21 +0000 (15:12 +0000)]
test/CodeGen/X86/bigstructret.ll: Relax stack offsets for hosts of stack-align=8, eg. win32 and netbsd.

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

11 years agoMake the reassociation pass more powerful so that it can handle expressions
Duncan Sands [Fri, 25 May 2012 12:03:02 +0000 (12:03 +0000)]
Make the reassociation pass more powerful so that it can handle expressions
with arbitrary topologies (previously it would give up when hitting a diamond
in the use graph for example).  The testcase from PR12764 is now reduced from
a pile of additions to the optimal 1617*%x0+208.  In doing this I changed the
previous strategy of dropping all uses for expression leaves to one of dropping
all but one use.  This works out more neatly (but required a bunch of tweaks)
and is also safer: some recently fixed bugs during recursive linearization were
because the linearization code thinks it completely owns a node if it has no uses
outside the expression it is linearizing.  But if the node was also in another
expression that had been linearized (and thus all uses of the node from that
expression dropped) then the conclusion that it is completely owned by the
expression currently being linearized is wrong.  Keeping one use from within each
linearized expression avoids this kind of mistake.

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

11 years agomisched: trace formatting
Andrew Trick [Fri, 25 May 2012 02:02:39 +0000 (02:02 +0000)]
misched: trace formatting

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

11 years agoEarly-continue.Reducing indentation.
Bill Wendling [Fri, 25 May 2012 00:57:21 +0000 (00:57 +0000)]
Early-continue.Reducing indentation.

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

11 years agoDon't call exit from a runtime.
Bill Wendling [Fri, 25 May 2012 00:55:38 +0000 (00:55 +0000)]
Don't call exit from a runtime.

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

11 years agoCompress MCRegisterInfo register name tables.
Jakob Stoklund Olesen [Fri, 25 May 2012 00:21:41 +0000 (00:21 +0000)]
Compress MCRegisterInfo register name tables.

Store (debugging) register names as offsets into a string table instead
of as char pointers.

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

11 years agoSimplify code for calling a function where CanLowerReturn fails, fixing a small bug...
Eli Friedman [Fri, 25 May 2012 00:09:29 +0000 (00:09 +0000)]
Simplify code for calling a function where CanLowerReturn fails, fixing a small bug in the process.

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

11 years agoSilence unused variable warnings from when assertions are disabled.
Kaelyn Uhrain [Thu, 24 May 2012 23:37:49 +0000 (23:37 +0000)]
Silence unused variable warnings from when assertions are disabled.

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

11 years agomisched: Use the same scheduling heuristics with -misched-topdown/bottomup.
Andrew Trick [Thu, 24 May 2012 23:11:17 +0000 (23:11 +0000)]
misched: Use the same scheduling heuristics with -misched-topdown/bottomup.

(except the part about choosing direction)

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

11 years agoShrink.
Jakob Stoklund Olesen [Thu, 24 May 2012 22:17:44 +0000 (22:17 +0000)]
Shrink.

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

11 years agoAdd support for range expressions in TableGen foreach loops.
Jakob Stoklund Olesen [Thu, 24 May 2012 22:17:39 +0000 (22:17 +0000)]
Add support for range expressions in TableGen foreach loops.

Like this:

  foreach i = 0-127 in ...

Use braces for composite ranges:

  foreach i = {0-3,9-7} in ...

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

11 years agoDon't put TGParser scratch results in the output.
Jakob Stoklund Olesen [Thu, 24 May 2012 22:17:36 +0000 (22:17 +0000)]
Don't put TGParser scratch results in the output.

Only fully expanded Records should go into RecordKeeper.

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

11 years agoSimplify TGParser::ProcessForEachDefs.
Jakob Stoklund Olesen [Thu, 24 May 2012 22:17:33 +0000 (22:17 +0000)]
Simplify TGParser::ProcessForEachDefs.

Use static type checking.

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

11 years agomisched: Trace regpressure.
Andrew Trick [Thu, 24 May 2012 22:11:14 +0000 (22:11 +0000)]
misched: Trace regpressure.

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

11 years agomisched: Give each ReadyQ a unique ID
Andrew Trick [Thu, 24 May 2012 22:11:12 +0000 (22:11 +0000)]
misched: Give each ReadyQ a unique ID

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

11 years agomisched: Added ScoreboardHazardRecognizer.
Andrew Trick [Thu, 24 May 2012 22:11:09 +0000 (22:11 +0000)]
misched: Added ScoreboardHazardRecognizer.

The Hazard checker implements in-order contraints, or interlocked
resources. Ready instructions with hazards do not enter the available
queue and are not visible to other heuristics.

The major code change is the addition of SchedBoundary to encapsulate
the state at the top or bottom of the schedule, including both a
pending and available queue.

The scheduler now counts cycles in sync with the hazard checker. These
are minimum cycle counts based on known hazards.

Targets with no itinerary (x86_64) currently remain at cycle 0. To fix
this, we need to provide some maximum issue width for all targets. We
also need to add the concept of expected latency vs. minimum latency.

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

11 years agomisched: Release bottom roots in reverse order.
Andrew Trick [Thu, 24 May 2012 22:11:05 +0000 (22:11 +0000)]
misched: Release bottom roots in reverse order.

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

11 years agomisched: rename ReadyQ class
Andrew Trick [Thu, 24 May 2012 22:11:03 +0000 (22:11 +0000)]
misched: rename ReadyQ class

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

11 years agomisched: copy comments so compareRPDelta is readable by itself.
Andrew Trick [Thu, 24 May 2012 22:11:01 +0000 (22:11 +0000)]
misched: copy comments so compareRPDelta is readable by itself.

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

11 years agoregpressure: Added RegisterPressure::dump
Andrew Trick [Thu, 24 May 2012 22:10:59 +0000 (22:10 +0000)]
regpressure: Added RegisterPressure::dump

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

11 years agoregpressure: physreg livein/out fix
Andrew Trick [Thu, 24 May 2012 22:10:57 +0000 (22:10 +0000)]
regpressure: physreg livein/out fix

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

11 years agoFix for CHECK-NOT misspelling.
David Blaikie [Thu, 24 May 2012 22:08:29 +0000 (22:08 +0000)]
Fix for CHECK-NOT misspelling.

Patch by Nicklas Bo Jensen.

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

11 years agoRemove the PTX back-end and all of its artifacts (triple, etc.)
Justin Holewinski [Thu, 24 May 2012 21:38:21 +0000 (21:38 +0000)]
Remove the PTX back-end and all of its artifacts (triple, etc.)

This back-end was deprecated in favor of the NVPTX back-end.

NV_CONTRIB

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

11 years agoTeach tblgen's set theory "sequence" operator to support an optional stride operand.
Owen Anderson [Thu, 24 May 2012 21:37:08 +0000 (21:37 +0000)]
Teach tblgen's set theory "sequence" operator to support an optional stride operand.

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

11 years agoTypo. Patch by Nicklas Bo Jensen <nbjensen@gmail.com>.
Chad Rosier [Thu, 24 May 2012 21:17:47 +0000 (21:17 +0000)]
Typo. Patch by Nicklas Bo Jensen <nbjensen@gmail.com>.

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

11 years agoTurn on mips16 pseudo op when compiling for mips16.
Akira Hatanaka [Thu, 24 May 2012 18:37:43 +0000 (18:37 +0000)]
Turn on mips16 pseudo op when compiling for mips16.
Expand test case for this.

Patch by Reed Kotler.

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

11 years agoEnable Mips16 compiler to compile a null program.
Akira Hatanaka [Thu, 24 May 2012 18:32:33 +0000 (18:32 +0000)]
Enable Mips16 compiler to compile a null program.
First code from the Mips16 compiler. Includes trivial test program.

Patch by Reed Kotler.

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

11 years agoSilence Clang's -Wlogical-op-parentheses warning.
David Blaikie [Thu, 24 May 2012 17:11:00 +0000 (17:11 +0000)]
Silence Clang's -Wlogical-op-parentheses warning.

I'm not sure it's really worth expressing this as a range rather than 3 specific equalities, but it doesn't seem fundamentally wrong either.

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

11 years agoAdd half support to LLVM (for OpenCL)
Tobias Grosser [Thu, 24 May 2012 15:59:06 +0000 (15:59 +0000)]
Add half support to LLVM (for OpenCL)

Submitted by: Anton Lokhmotov  <Anton.Lokhmotov@arm.com>

Approved by: o Anton Korobeynikov
             o Micah Villmow
             o David Neto

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

11 years agoTesting commit access
Meador Inge [Thu, 24 May 2012 14:20:13 +0000 (14:20 +0000)]
Testing commit access

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

11 years agoPR1255 related changes (case ranges):
Stepan Dyatkovskiy [Thu, 24 May 2012 09:33:20 +0000 (09:33 +0000)]
PR1255 related changes (case ranges):
LowerSwitch::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced.
test/Transform/LowerSwitch/feature.ll - this test was refactored: grep + count was replaced with FileCheck usage.

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

11 years agoFix -Wcovered-switch-default warning.
Patrik Hägglund [Thu, 24 May 2012 07:51:46 +0000 (07:51 +0000)]
Fix -Wcovered-switch-default warning.

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

11 years agoConvert assert(0) to llvm_unreachable.
Craig Topper [Thu, 24 May 2012 07:02:50 +0000 (07:02 +0000)]
Convert assert(0) to llvm_unreachable.

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

11 years agoRemove old release notes. Ready them for additions from current development
Bill Wendling [Thu, 24 May 2012 06:38:09 +0000 (06:38 +0000)]
Remove old release notes. Ready them for additions from current development
cycle.

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

11 years agoMark some static arrays as const.
Craig Topper [Thu, 24 May 2012 06:35:32 +0000 (06:35 +0000)]
Mark some static arrays as const.

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

11 years agoUse uint16_t to store registers in static tables. Matches other tables.
Craig Topper [Thu, 24 May 2012 06:09:56 +0000 (06:09 +0000)]
Use uint16_t to store registers in static tables. Matches other tables.

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

11 years agoUse uint16_t to store register number in static tables to match other tables.
Craig Topper [Thu, 24 May 2012 05:55:47 +0000 (05:55 +0000)]
Use uint16_t to store register number in static tables to match other tables.

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

11 years agoMake some opcode tables static and const. Allows code to avoid making copies to pass...
Craig Topper [Thu, 24 May 2012 05:17:00 +0000 (05:17 +0000)]
Make some opcode tables static and const. Allows code to avoid making copies to pass the tables around.

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

11 years agoReflect that tblgen is now llvm-tblgen
Joel Jones [Thu, 24 May 2012 04:38:50 +0000 (04:38 +0000)]
Reflect that tblgen is now llvm-tblgen

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

11 years agoMark a couple arrays as static and const. Use array_lengthof instead of sizeof/sizeof.
Craig Topper [Thu, 24 May 2012 04:22:05 +0000 (04:22 +0000)]
Mark a couple arrays as static and const. Use array_lengthof instead of sizeof/sizeof.

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

11 years agoMark a static array as const.
Craig Topper [Thu, 24 May 2012 04:11:15 +0000 (04:11 +0000)]
Mark a static array as const.

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

11 years agoMark a static table as const. Shrink opcode size in static tables to uint16_t. Simpli...
Craig Topper [Thu, 24 May 2012 03:59:11 +0000 (03:59 +0000)]
Mark a static table as const. Shrink opcode size in static tables to uint16_t. Simplify loop iterating over one of those tables. No functional change intended.

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

11 years agoTidy up naming for consistency and other cleanup. No functional change intended.
Chad Rosier [Wed, 23 May 2012 23:45:10 +0000 (23:45 +0000)]
Tidy up naming for consistency and other cleanup.  No functional change intended.

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

11 years agoAdd a test case for global live range splitting.
Jakob Stoklund Olesen [Wed, 23 May 2012 23:42:23 +0000 (23:42 +0000)]
Add a test case for global live range splitting.

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

11 years agoAdd a last resort tryInstructionSplit() to RAGreedy.
Jakob Stoklund Olesen [Wed, 23 May 2012 22:37:27 +0000 (22:37 +0000)]
Add a last resort tryInstructionSplit() to RAGreedy.

Live ranges with a constrained register class may benefit from splitting
around individual uses. It allows the remaining live range to use a
larger register class where it may allocate. This is like spilling to a
different register class.

This is only attempted on constrained register classes.

<rdar://problem/11438902>

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

11 years agoForgot to reverse conditional.
Bill Wendling [Wed, 23 May 2012 22:12:50 +0000 (22:12 +0000)]
Forgot to reverse conditional.

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

11 years agoReduce indentation by early detection of 'continue'. No functionality change.
Bill Wendling [Wed, 23 May 2012 22:09:50 +0000 (22:09 +0000)]
Reduce indentation by early detection of 'continue'. No functionality change.

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

11 years agollvm-ld does not exist anymore, use llvm-link instead.
Nicolas Geoffray [Wed, 23 May 2012 20:34:19 +0000 (20:34 +0000)]
llvm-ld does not exist anymore, use llvm-link instead.

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

11 years agoFix typo in flag to opt, and also a CHECK-NEXT that doesn't follow a
Kaelyn Uhrain [Wed, 23 May 2012 20:21:36 +0000 (20:21 +0000)]
Fix typo in flag to opt, and also a CHECK-NEXT that doesn't follow a
CHECK. The latter error was hidden by the former, and the test harness
used by e.g. "make check" silently ignored that opt was printing an
error message about an unknown flag instead of running on the test file.

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

11 years agoCorrectly deal with identity copies in RegisterCoalescer.
Jakob Stoklund Olesen [Wed, 23 May 2012 20:21:06 +0000 (20:21 +0000)]
Correctly deal with identity copies in RegisterCoalescer.

Now that the coalescer keeps live intervals and machine code in sync at
all times, it needs to deal with identity copies differently.

When merging two virtual registers, all identity copies are removed
right away. This means that other identity copies must come from
somewhere else, and they are going to have a value number.

Deal with such copies by merging the value numbers before erasing the
copy instruction. Otherwise, we leave dangling value numbers in the live
interval.

This fixes PR12927.

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

11 years agoFix how CMake appends -m32 to linker command-lines
Tim Northover [Wed, 23 May 2012 18:42:02 +0000 (18:42 +0000)]
Fix how CMake appends -m32 to linker command-lines

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

11 years ago[arm-fast-isel] Add support for non-global callee.
Chad Rosier [Wed, 23 May 2012 18:38:57 +0000 (18:38 +0000)]
[arm-fast-isel] Add support for non-global callee.
Patch by Jush Lu <jush.msn@gmail.com>.

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

11 years agoBoundsChecking: add a couple of simple tests and fix a bug in branch emition
Nuno Lopes [Wed, 23 May 2012 16:24:52 +0000 (16:24 +0000)]
BoundsChecking: add a couple of simple tests and fix a bug in branch emition

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

11 years agorevert r156383: removal of TYPE_CODE_FUNCTION_OLD
Nuno Lopes [Wed, 23 May 2012 15:19:39 +0000 (15:19 +0000)]
revert r156383: removal of TYPE_CODE_FUNCTION_OLD
Apparently LLVM only stopped emitting this after LLVM 3.0

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

11 years agoFix the inliner so that the optsize function attribute don't alter the
Patrik Hägglund [Wed, 23 May 2012 13:42:57 +0000 (13:42 +0000)]
Fix the inliner so that the optsize function attribute don't alter the
inline threshold if the global inline threshold is lower (as for -Oz).

Reviewed by Chandler Carruth and Bill Wendling.

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

11 years agoFixed typo in r156905.
Patrik Hägglund [Wed, 23 May 2012 12:34:56 +0000 (12:34 +0000)]
Fixed typo in r156905.

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

11 years agoSmall fix for the debug output from PBQP (PR12822).
Patrik Hägglund [Wed, 23 May 2012 12:12:58 +0000 (12:12 +0000)]
Small fix for the debug output from PBQP (PR12822).

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

11 years agoUse zero-based shadow by default on Android.
Evgeniy Stepanov [Wed, 23 May 2012 11:52:12 +0000 (11:52 +0000)]
Use zero-based shadow by default on Android.

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

11 years agoPR1255(case ranges) related changes in Local Transformations.
Stepan Dyatkovskiy [Wed, 23 May 2012 08:18:26 +0000 (08:18 +0000)]
PR1255(case ranges) related changes in Local Transformations.

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

11 years agoTidy up spacing.
Craig Topper [Wed, 23 May 2012 05:44:51 +0000 (05:44 +0000)]
Tidy up spacing.

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

11 years agosmall refinement to r157218 to save a tiny amount of table size in the common
Chris Lattner [Wed, 23 May 2012 05:19:18 +0000 (05:19 +0000)]
small refinement to r157218 to save a tiny amount of table size in the common
case.

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

11 years agoFix indentation of wrapped line for readability. No functional change.
Craig Topper [Wed, 23 May 2012 03:59:53 +0000 (03:59 +0000)]
Fix indentation of wrapped line for readability. No functional change.

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

11 years agoAdd support for C++11 enum classes in llvm.
Eric Christopher [Wed, 23 May 2012 00:09:20 +0000 (00:09 +0000)]
Add support for C++11 enum classes in llvm.

Part of rdar://11496790

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

11 years agoaddress some of John Criswell's comments
Nuno Lopes [Tue, 22 May 2012 22:02:19 +0000 (22:02 +0000)]
address some of John Criswell's comments
teach computeAllocSize about realloc, reallocf, and valloc

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

11 years agoARMDisassembler.cpp: Fix utf8 char in comments.
NAKAMURA Takumi [Tue, 22 May 2012 21:47:02 +0000 (21:47 +0000)]
ARMDisassembler.cpp: Fix utf8 char in comments.

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

11 years agoUntabify and 80-col.
Eric Christopher [Tue, 22 May 2012 18:45:24 +0000 (18:45 +0000)]
Untabify and 80-col.

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

11 years agoFormatting consistency.
Eric Christopher [Tue, 22 May 2012 18:45:18 +0000 (18:45 +0000)]
Formatting consistency.

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

11 years agoAlso compute TopoSigs in synthetic register classes.
Jakob Stoklund Olesen [Tue, 22 May 2012 18:20:28 +0000 (18:20 +0000)]
Also compute TopoSigs in synthetic register classes.

CodeGenRegisterClass has two constructors. Both need to compute the
TopoSigs BitVector.

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

11 years agohopefully fix the CMake build. sorry for breakage
Nuno Lopes [Tue, 22 May 2012 17:40:46 +0000 (17:40 +0000)]
hopefully fix the CMake build. sorry for breakage

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

11 years agoLSR fix: add a missing phi check during IV hoisting.
Andrew Trick [Tue, 22 May 2012 17:39:59 +0000 (17:39 +0000)]
LSR fix: add a missing phi check during IV hoisting.

Fixes PR12898: SCEVExpander crash.

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

11 years agoadd a new pass to instrument loads and stores for run-time bounds checking
Nuno Lopes [Tue, 22 May 2012 17:19:09 +0000 (17:19 +0000)]
add a new pass to instrument loads and stores for run-time bounds checking
move EmitGEPOffset from InstCombine to Transforms/Utils/Local.h

(a draft of this) patch reviewed by Andrew, thanks.

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

11 years agorevert my previous patches that introduced an additional parameter to the objectsize...
Nuno Lopes [Tue, 22 May 2012 15:25:31 +0000 (15:25 +0000)]
revert my previous patches that introduced an additional parameter to the objectsize intrinsic.
After a lot of discussion, we realized it's not the best option for run-time bounds checking

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

11 years agoOnly erase virtregs with no uses left.
Jakob Stoklund Olesen [Tue, 22 May 2012 14:52:12 +0000 (14:52 +0000)]
Only erase virtregs with no uses left.

Also make sure registers aren't erased twice if the dead def mentions
the register twice.

This fixes PR12911.

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

11 years agoFix PR12858, a crash due to GVN's PRE not fully removing an instruction from the
Duncan Sands [Tue, 22 May 2012 14:17:53 +0000 (14:17 +0000)]
Fix PR12858, a crash due to GVN's PRE not fully removing an instruction from the
leader table.  That's because it wasn't expecting instructions to turn up as
leader for a value number that is not its own, but equality propagation could
create this situation.  One solution is to have the leader table use a WeakVH
but this slows down GVN by about 5%.  Instead just have equality propagation not
add instructions to the leader table, only constants and arguments.  In theory
this might cause GVN to run more (each time it changes something it runs again)
but it doesn't seem to occur enough to cause a slow down.

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

11 years agoFix constant used for pshufb mask when lowering v16i8 shuffles. Bug introduced in...
Craig Topper [Tue, 22 May 2012 06:09:38 +0000 (06:09 +0000)]
Fix constant used for pshufb mask when lowering v16i8 shuffles. Bug introduced in r157043. Fixes PR12908.

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

11 years agoThis patch adds a predicate to existing mips32 and mips64 so that those
Akira Hatanaka [Tue, 22 May 2012 03:10:09 +0000 (03:10 +0000)]
This patch adds a predicate to existing mips32 and mips64 so that those
instruction encodings can be excluded during mips16 processing.

This revision fixes the issue raised by Jim Grosbach.

bool hasStandardEncoding() const { return !inMips16Mode(); }

When micromips is added it will be

bool StandardEncoding() const { return !inMips16Mode()&&  !inMicroMipsMode(); }

No additional testing is needed other than to assure that there is no regression
from this patch.

Patch by Reed Kotler.

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

11 years agofix the quotient returned by sdivrem() for the case when LHS is negative and RHS...
Nuno Lopes [Tue, 22 May 2012 01:09:48 +0000 (01:09 +0000)]
fix the quotient returned by sdivrem() for the case when LHS is negative and RHS is positive
based on a patch by Preston Briggs, with some modifications

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

11 years agoFileCheck'ize test, and add a bit to test for r157221.
Jim Grosbach [Mon, 21 May 2012 23:50:00 +0000 (23:50 +0000)]
FileCheck'ize test, and add a bit to test for r157221.

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

11 years agoARM: .end_data_region mismatch in Thumb2.
Jim Grosbach [Mon, 21 May 2012 23:34:42 +0000 (23:34 +0000)]
ARM: .end_data_region mismatch in Thumb2.

32-bit offset jump tables just use real branch instructions and so aren't
marked as data regions. We were still emitting the .end_data_region
marker though, which assert()ed.

rdar://11499158

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

11 years agoAdded address space qualifier to intrinsic PointerType arguments.
Pete Cooper [Mon, 21 May 2012 23:21:28 +0000 (23:21 +0000)]
Added address space qualifier to intrinsic PointerType arguments.

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

11 years agoFix use of an unitialized value in the LegalizeOps expansion for ISD::SUB. No in...
Owen Anderson [Mon, 21 May 2012 22:39:20 +0000 (22:39 +0000)]
Fix use of an unitialized value in the LegalizeOps expansion for ISD::SUB.  No in-tree targets exercise this path.

Patch by Micah Villmow.

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

11 years agoThumb2: RSB source register should be rGRP not GPRnopc.
Jim Grosbach [Mon, 21 May 2012 17:57:17 +0000 (17:57 +0000)]
Thumb2: RSB source register should be rGRP not GPRnopc.

t2RSB defined the operand correctly, but tRSBS didn't.

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

11 years agoMark an unreachable region of code with llvm_unreachable.
Dan Gohman [Mon, 21 May 2012 17:41:28 +0000 (17:41 +0000)]
Mark an unreachable region of code with llvm_unreachable.

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

11 years agoTypo.
Chad Rosier [Mon, 21 May 2012 17:13:41 +0000 (17:13 +0000)]
Typo.

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

11 years agoMake it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually used.
Owen Anderson [Mon, 21 May 2012 16:57:17 +0000 (16:57 +0000)]
Make it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually used.

Patch by Jose Fonseca.

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

11 years agotest commit
Patrik Hägglund [Mon, 21 May 2012 13:18:06 +0000 (13:18 +0000)]
test commit

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

11 years agoPR1255 (case ranges: work with ConstantRangesSet instead of ConstantInt) related...
Stepan Dyatkovskiy [Mon, 21 May 2012 10:44:40 +0000 (10:44 +0000)]
PR1255 (case ranges: work with ConstantRangesSet instead of ConstantInt) related changes for Execution and Verifier.

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