oota-llvm.git
13 years agoFactor some code into a new EmitFrames method.
Rafael Espindola [Tue, 10 May 2011 03:14:15 +0000 (03:14 +0000)]
Factor some code into a new EmitFrames method.

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

13 years agoRemove unused argument.
Rafael Espindola [Tue, 10 May 2011 03:01:39 +0000 (03:01 +0000)]
Remove unused argument.

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

13 years agoParsing and plumbing for .cfi_sections.
Rafael Espindola [Tue, 10 May 2011 01:10:18 +0000 (01:10 +0000)]
Parsing and plumbing for .cfi_sections.

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

13 years agoPreserve line number information.
Devang Patel [Tue, 10 May 2011 00:03:11 +0000 (00:03 +0000)]
Preserve line number information.

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

13 years agoDo not ignore InlinedAt while walking up scope chain to find subprogram node.
Devang Patel [Mon, 9 May 2011 22:14:49 +0000 (22:14 +0000)]
Do not ignore InlinedAt while walking up scope chain to find subprogram node.

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

13 years agoTidy up. 80-column and whitespace.
Jim Grosbach [Mon, 9 May 2011 20:05:25 +0000 (20:05 +0000)]
Tidy up. 80-column and whitespace.

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

13 years agoLook through struct wrapped types for inline asm statments.
Eric Christopher [Mon, 9 May 2011 20:04:43 +0000 (20:04 +0000)]
Look through struct wrapped types for inline asm statments.

Patch by Evan Cheng.

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

13 years agoChange a few std::maps to DenseMaps.
Dan Gohman [Mon, 9 May 2011 18:44:09 +0000 (18:44 +0000)]
Change a few std::maps to DenseMaps.

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

13 years agoFix td file comments for Mips.
Eric Christopher [Mon, 9 May 2011 18:16:46 +0000 (18:16 +0000)]
Fix td file comments for Mips.

Patch by Liu <proljc@gmail.com>!

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

13 years agoFixed MC encoding for index_align for VLD1/VST1 (single element from one lane) for...
Mon P Wang [Mon, 9 May 2011 17:47:27 +0000 (17:47 +0000)]
Fixed MC encoding for index_align for VLD1/VST1 (single element from one lane) for size 32

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

13 years agoIndent properly, no functionality change.
Duncan Sands [Mon, 9 May 2011 08:03:33 +0000 (08:03 +0000)]
Indent properly, no functionality change.

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

13 years agoEliminate an unused line to fix a warning.
NAKAMURA Takumi [Sun, 8 May 2011 23:19:04 +0000 (23:19 +0000)]
Eliminate an unused line to fix a warning.

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

13 years agoRemove an assertion to fix PR9872.
Jakob Stoklund Olesen [Sun, 8 May 2011 19:21:08 +0000 (19:21 +0000)]
Remove an assertion to fix PR9872.

It can happen that a live debug variable is the last use of a sub-register, and
the register allocator will pick a larger register class for the virtual
register.  If the allocated register doesn't support the sub-register index,
just use %noreg for the debug variables instead of asserting.

In PR9872, a debug variable ends up in the sub_8bit_hi part of a GR32_ABCD
register. The register is split and one part is inflated to GR32 and assigned
%ESI because there are no more normal uses of sub_8bit_hi.

Since %ESI doesn't have that sub-register, substPhysReg asserted. Now it will
simply insert a %noreg instead, and the debug variable will be marked
unavailable in that range.

We don't currently have a way of saying: !"value" is in bits 8-15 of %ESI, I
don't know if DWARF even supports that.

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

13 years agoX86: Add a bunch of peeps for add and sub of SETB.
Benjamin Kramer [Sun, 8 May 2011 18:36:07 +0000 (18:36 +0000)]
X86: Add a bunch of peeps for add and sub of SETB.

"b + ((a < b) ? 1 : 0)" compiles into
cmpl %esi, %edi
adcl $0, %esi
instead of
cmpl %esi, %edi
sbbl %eax, %eax
andl $1, %eax
addl %esi, %eax

This saves a register, a false dependency on %eax
(Intel's CPUs still don't ignore it) and it's shorter.

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

13 years agoDon't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
Rafael Espindola [Sun, 8 May 2011 14:35:21 +0000 (14:35 +0000)]
Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
the smaller encoding and this cuts 270336 bytes from a release version of
clang and 1246272 bytes from a debug build.

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

13 years agoPR9869: Add explicit destructor declarations to Operator subclasses, to allow
Eli Friedman [Sun, 8 May 2011 01:59:22 +0000 (01:59 +0000)]
PR9869: Add explicit destructor declarations to Operator subclasses, to allow
compiling Operator.h with gcc 4.6 in C++0x mode.

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

13 years agoEliminate the ARM sub-register indexes that are not needed by the sources.
Jakob Stoklund Olesen [Sat, 7 May 2011 21:22:42 +0000 (21:22 +0000)]
Eliminate the ARM sub-register indexes that are not needed by the sources.

Tablegen will invent its own names for these indexes, and the register file is a
bit simpler.

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

13 years agoTeach TableGen to automatically generate missing SubRegIndex instances.
Jakob Stoklund Olesen [Sat, 7 May 2011 21:22:39 +0000 (21:22 +0000)]
Teach TableGen to automatically generate missing SubRegIndex instances.

The RegisterInfo.td file should only specify the indexes that sources need to
refer to. The rest is inferred.

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

13 years agoFix comments per Duncan's review.
Eli Friedman [Sat, 7 May 2011 19:23:14 +0000 (19:23 +0000)]
Fix comments per Duncan's review.

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

13 years agoZap unnecessary svn:ignore.
Eli Friedman [Sat, 7 May 2011 19:22:28 +0000 (19:22 +0000)]
Zap unnecessary svn:ignore.

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

13 years agoThe comparision "max(x,y)==x" is equivalent to "x>=y". Since the max is
Duncan Sands [Sat, 7 May 2011 16:56:49 +0000 (16:56 +0000)]
The comparision "max(x,y)==x" is equivalent to "x>=y".  Since the max is
often expressed as "x >= y ? x : y", there is a good chance we can extract
the existing "x >= y" from it and use that as a replacement for "max(x,y)==x".

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

13 years agoFix the non-MC encoding of pkhbt and pkhtb.
Eric Christopher [Sat, 7 May 2011 04:37:27 +0000 (04:37 +0000)]
Fix the non-MC encoding of pkhbt and pkhtb.

Patch by Stephen Hines.

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

13 years agoRevert ExecutionEngine patches, they either failed to build or broke unit tests.
Jakob Stoklund Olesen [Sat, 7 May 2011 03:12:54 +0000 (03:12 +0000)]
Revert ExecutionEngine patches, they either failed to build or broke unit tests.

Please ensure the build is clean and tests are passing when recommitting.

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

13 years agoSwitch Darwin to the generic CIE/FDE printer.
Rafael Espindola [Fri, 6 May 2011 22:29:04 +0000 (22:29 +0000)]
Switch Darwin to the generic CIE/FDE printer.

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

13 years agoExecutionEngine: delete duplicated files
Dylan Noblesmith [Fri, 6 May 2011 22:24:04 +0000 (22:24 +0000)]
ExecutionEngine: delete duplicated files

Forgot to `svn rm` these in revisions 131025 / 131029.

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

13 years agoExecutionEngine: add missing file
Dylan Noblesmith [Fri, 6 May 2011 22:20:09 +0000 (22:20 +0000)]
ExecutionEngine: add missing file

From revision 131025.

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

13 years ago1. Keep lines in 80 columns.
Akira Hatanaka [Fri, 6 May 2011 22:11:29 +0000 (22:11 +0000)]
1. Keep lines in 80 columns.
2. Remove unused function.
3. Correct indentation.

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

13 years agoExecutionEngine: move createJIT() definition
Dylan Noblesmith [Fri, 6 May 2011 22:07:14 +0000 (22:07 +0000)]
ExecutionEngine: move createJIT() definition

As an ExecutionEngine class function, its definition
really belongs in ExecutionEngine.cpp, not JIT.cpp.

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

13 years agoExecutionEngine: push TargetMachine creation into clients
Dylan Noblesmith [Fri, 6 May 2011 22:06:22 +0000 (22:06 +0000)]
ExecutionEngine: push TargetMachine creation into clients

In particular, into EngineBuilder. This should only impact
the private API between the EE and EB classes, not external
clients, since JITCtor and MCJITCtor are both protected members.

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

13 years agoExecutionEngine: fix JIT/MCJIT selectTarget() duplication
Dylan Noblesmith [Fri, 6 May 2011 22:05:43 +0000 (22:05 +0000)]
ExecutionEngine: fix JIT/MCJIT selectTarget() duplication

This prepares for making JITCtor/MCJITCtor take a
TargetMachine* directly from clients like EngineBuilder.

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

13 years agoEmit a proper error message when register allocators run out of registers.
Jakob Stoklund Olesen [Fri, 6 May 2011 21:58:30 +0000 (21:58 +0000)]
Emit a proper error message when register allocators run out of registers.

This can't be just an assertion, users can always write impossible inline
assembly. Such an assembly statement should be included in the error message.

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

13 years agoAdded an assertion, and updated a comment.
Andrew Trick [Fri, 6 May 2011 21:52:52 +0000 (21:52 +0000)]
Added an assertion, and updated a comment.

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

13 years agoIt's valid to take the blockaddress of a different function, so remove this
Nick Lewycky [Fri, 6 May 2011 21:09:44 +0000 (21:09 +0000)]
It's valid to take the blockaddress of a different function, so remove this
assert in the bitcode writer. No change needed because the ValueEnumerator holds
a whole-module numbering anyhow. Fixes PR9857!

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

13 years ago80 col violations.
Evan Cheng [Fri, 6 May 2011 20:52:23 +0000 (20:52 +0000)]
80 col violations.

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

13 years agoMake the logic for determining function alignment more explicit. No functionality...
Eli Friedman [Fri, 6 May 2011 20:34:06 +0000 (20:34 +0000)]
Make the logic for determining function alignment more explicit.  No functionality change.

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

13 years agoUse array_lengthof. No functional change.
Eli Friedman [Fri, 6 May 2011 19:50:10 +0000 (19:50 +0000)]
Use array_lengthof.  No functional change.

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

13 years agoIterate backwards over debug locations when splitting them so they can be safely...
Jakob Stoklund Olesen [Fri, 6 May 2011 19:31:19 +0000 (19:31 +0000)]
Iterate backwards over debug locations when splitting them so they can be safely erased.

This should unbreak dragonegg-i386-linux and build-self-4-mingw32.

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

13 years agoImprove diagnostics for some parse errors. Not asserting when a user input
Jim Grosbach [Fri, 6 May 2011 18:47:45 +0000 (18:47 +0000)]
Improve diagnostics for some parse errors. Not asserting when a user input
error is detected is a good thing.

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

13 years agoParseFile() may throw, so extend the try/catch to handle that.
Jim Grosbach [Fri, 6 May 2011 18:39:28 +0000 (18:39 +0000)]
ParseFile() may throw, so extend the try/catch to handle that.

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

13 years agoMove few target-dependant tests to appropriate directories.
Galina Kistanova [Fri, 6 May 2011 18:24:46 +0000 (18:24 +0000)]
Move few target-dependant tests to appropriate directories.

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

13 years agoTypo: Reviewed by Alistair.
Andrew Trick [Fri, 6 May 2011 18:14:32 +0000 (18:14 +0000)]
Typo: Reviewed by Alistair.

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

13 years agoPass -disable-cfi to llc.
Rafael Espindola [Fri, 6 May 2011 18:01:58 +0000 (18:01 +0000)]
Pass -disable-cfi to llc.

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

13 years agoUpdate LiveDebugVariables after live range splitting.
Jakob Stoklund Olesen [Fri, 6 May 2011 18:00:02 +0000 (18:00 +0000)]
Update LiveDebugVariables after live range splitting.

After a virtual register is split, update any debug user variables that resided
in the old register. This ensures that the LiveDebugVariables are still correct
after register allocation.

This may create DBG_VALUE instructions that place a user variable in a register
in parts of the function and in a stack slot in other parts. DwarfDebug
currently doesn't support that.

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

13 years agoUse TargetMachine hooks to properly print debug variable locations.
Jakob Stoklund Olesen [Fri, 6 May 2011 17:59:59 +0000 (17:59 +0000)]
Use TargetMachine hooks to properly print debug variable locations.

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

13 years agoAlso count identity copies.
Jakob Stoklund Olesen [Fri, 6 May 2011 17:59:57 +0000 (17:59 +0000)]
Also count identity copies.

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

13 years agoPass -disable-cfi.
Rafael Espindola [Fri, 6 May 2011 17:44:58 +0000 (17:44 +0000)]
Pass -disable-cfi.

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

13 years agoPost-RA scheduler compile time fix. Quadratic computation of DAG node depth.
Andrew Trick [Fri, 6 May 2011 17:09:08 +0000 (17:09 +0000)]
Post-RA scheduler compile time fix. Quadratic computation of DAG node depth.

The post-ra scheduler was explicitly updating the depth of a node's
successors after scheduling it, regardless of whether the successor
was ready. This is quadratic for DAGs with transitively redundant
edges. I simply removed the useless update of depth, which is lazilly
computed later.
Fixes <rdar://problem/9044332> compiler takes way too long to build TextInput.

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

13 years agoMove CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebu...
Devang Patel [Fri, 6 May 2011 16:57:54 +0000 (16:57 +0000)]
Move CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebug.cpp to DwarfCompileUnit.cpp

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

13 years agoNothing else uses this label.
Rafael Espindola [Fri, 6 May 2011 15:44:29 +0000 (15:44 +0000)]
Nothing else uses this label.

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

13 years agoYet more dead code.
Rafael Espindola [Fri, 6 May 2011 15:31:55 +0000 (15:31 +0000)]
Yet more dead code.

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

13 years agoUpdate comments.
Rafael Espindola [Fri, 6 May 2011 15:28:56 +0000 (15:28 +0000)]
Update comments.

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

13 years agoMore dead code elimination.
Rafael Espindola [Fri, 6 May 2011 15:22:26 +0000 (15:22 +0000)]
More dead code elimination.

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

13 years agoDead code elimination.
Rafael Espindola [Fri, 6 May 2011 14:56:22 +0000 (14:56 +0000)]
Dead code elimination.

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

13 years agoPTX: add PTX 2.3 language target
Justin Holewinski [Fri, 6 May 2011 11:40:36 +0000 (11:40 +0000)]
PTX:  add PTX 2.3 language target

Patch by Wei-Ren Chen

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

13 years agoFix PR9820: a read-only call differs from a load in that a load doesn't
Duncan Sands [Fri, 6 May 2011 10:30:37 +0000 (10:30 +0000)]
Fix PR9820: a read-only call differs from a load in that a load doesn't
return the pointer being dereferenced, it returns the pointee, but a call
might return the pointer itself.

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

13 years agoRe-revert r130877; it's apparently causing a regression on 197.parser,
Eli Friedman [Fri, 6 May 2011 05:23:07 +0000 (05:23 +0000)]
Re-revert r130877; it's apparently causing a regression on 197.parser,
possibly related to cbnz formation.

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

13 years agoThe computation of string length is not that complicated. Fix it, again. :)
Nick Lewycky [Thu, 5 May 2011 23:52:18 +0000 (23:52 +0000)]
The computation of string length is not that complicated. Fix it, again. :)

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

13 years agoRemove DwarfTableException.
Rafael Espindola [Thu, 5 May 2011 23:19:54 +0000 (23:19 +0000)]
Remove DwarfTableException.

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

13 years agoRemove the DwarfTable enum.
Rafael Espindola [Thu, 5 May 2011 22:14:31 +0000 (22:14 +0000)]
Remove the DwarfTable enum.

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

13 years agoIn debug output, clearly list new instructions without DebugLoc.
Devang Patel [Thu, 5 May 2011 22:05:57 +0000 (22:05 +0000)]
In debug output, clearly list new instructions without DebugLoc.

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

13 years agoRemove little used statistical counter.
Devang Patel [Thu, 5 May 2011 22:00:08 +0000 (22:00 +0000)]
Remove little used statistical counter.

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

13 years agoPR9838: Fix transform introduced in r127064 to not trigger when only one side of...
Eli Friedman [Thu, 5 May 2011 21:59:18 +0000 (21:59 +0000)]
PR9838: Fix transform introduced in r127064 to not trigger when only one side of the icmp is an exact shift.

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

13 years agoMove PPC Linux to CFI.
Rafael Espindola [Thu, 5 May 2011 21:34:33 +0000 (21:34 +0000)]
Move PPC Linux to CFI.

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

13 years agoFix typo. No functional change.
Nick Lewycky [Thu, 5 May 2011 21:27:14 +0000 (21:27 +0000)]
Fix typo. No functional change.

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

13 years agoImplement a really simple DwarfSjLjException.
Rafael Espindola [Thu, 5 May 2011 20:48:31 +0000 (20:48 +0000)]
Implement a really simple DwarfSjLjException.

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

13 years agoList all exception types in a switch.
Rafael Espindola [Thu, 5 May 2011 19:48:34 +0000 (19:48 +0000)]
List all exception types in a switch.

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

13 years agoARM post RA scheduler compile time fix.
Andrew Trick [Thu, 5 May 2011 19:32:21 +0000 (19:32 +0000)]
ARM post RA scheduler compile time fix.

BuildSchedGraph was quadratic in the number of calls in the basic
block. After this fix, it keeps only a single call at the top of the
DefList so compile time doesn't blow up on large blocks. This reduces
postRA sched time on an external test case from 81s to 0.3s.  Although
r130800 (reduced ARM register alias defs) also partially fixes the
issue by reducing the constant overhead of checking call interference
by an order of magnitude.

Fixes <rdar://problem/7662664> very poor compile time with post RA scheduling.

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

13 years agowhitespace
Andrew Trick [Thu, 5 May 2011 19:24:06 +0000 (19:24 +0000)]
whitespace

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

13 years agoDon't produce a __debug_frame.
Rafael Espindola [Thu, 5 May 2011 18:43:39 +0000 (18:43 +0000)]
Don't produce a __debug_frame.
I tested both gdb on a bootstrapped clang and and the gdb testsuite on OS X (snow leopard)
and both are happy using __eh_frame.

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

13 years agoMany LLVM tests relies on standard output stream be in the binary mode. Which is...
Galina Kistanova [Thu, 5 May 2011 18:40:27 +0000 (18:40 +0000)]
Many LLVM tests relies on standard output stream be in the binary mode. Which is not always the case (on Windows in particular). The patch adds a test to verify that the standard output stream is actually in the binary mode.

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

13 years agoAllow FastISel of three-register-operand instructions.
Owen Anderson [Thu, 5 May 2011 17:59:04 +0000 (17:59 +0000)]
Allow FastISel of three-register-operand instructions.

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

13 years agoIf debug info for inlined function is missing then handle it gracefully.
Devang Patel [Thu, 5 May 2011 17:54:26 +0000 (17:54 +0000)]
If debug info for inlined function is missing then handle it gracefully.

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

13 years agoPR9848: pandn is not commutative.
Eli Friedman [Thu, 5 May 2011 17:45:31 +0000 (17:45 +0000)]
PR9848: pandn is not commutative.

No test because I can't think of any way to write one that won't break quickly.

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

13 years agoAdd some statistics to the splitting and spilling frameworks.
Jakob Stoklund Olesen [Thu, 5 May 2011 17:22:53 +0000 (17:22 +0000)]
Add some statistics to the splitting and spilling frameworks.

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

13 years agoAvoid extra vreg copies for arguments passed in registers. Specifically, this can...
Eli Friedman [Thu, 5 May 2011 16:53:34 +0000 (16:53 +0000)]
Avoid extra vreg copies for arguments passed in registers.  Specifically, this can make MachineCSE more effective in some cases (especially in small functions).  PR8361 / part of rdar://problem/8259436 .

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

13 years agoFix test to be less sensitive to coalescing.
Jakob Stoklund Olesen [Thu, 5 May 2011 16:48:00 +0000 (16:48 +0000)]
Fix test to be less sensitive to coalescing.

This should unbreak llvm-gcc-i386-linux-selfhost.

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

13 years agoSmall syntax cleanup; we don't need to #define constants in C++. No functionality...
Eli Friedman [Thu, 5 May 2011 16:25:23 +0000 (16:25 +0000)]
Small syntax cleanup; we don't need to #define constants in C++.  No functionality change intended.

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

13 years agoMinor correction to r130877; fixes PR9846 and hopefully the buildbot failures.
Eli Friedman [Thu, 5 May 2011 16:18:11 +0000 (16:18 +0000)]
Minor correction to r130877; fixes PR9846 and hopefully the buildbot failures.

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

13 years agoMinor change: Fix the typo in RegionPass.h and RegionPass.cpp.
Hongbin Zheng [Thu, 5 May 2011 13:59:38 +0000 (13:59 +0000)]
Minor change: Fix the typo in RegionPass.h and RegionPass.cpp.

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

13 years agoRemove a flag that would set the ".eh" symbol as .globl. MachO was the only one
Bill Wendling [Thu, 5 May 2011 06:49:15 +0000 (06:49 +0000)]
Remove a flag that would set the ".eh" symbol as .globl. MachO was the only one
who used this flag, and it now emits CFI and doesn't emit this anymore. All
other targets left this flag "false".
<rdar://problem/8486371>

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

13 years agollvmc: Make 'true' and 'false' instances of a 'Bool' class.
Mikhail Glushenkov [Thu, 5 May 2011 04:25:03 +0000 (04:25 +0000)]
llvmc: Make 'true' and 'false' instances of a 'Bool' class.

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

13 years agollvmc: Make it possible to provide an argument to (join).
Mikhail Glushenkov [Thu, 5 May 2011 04:24:58 +0000 (04:24 +0000)]
llvmc: Make it possible to provide an argument to (join).

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

13 years agoUpdate the gcov version used slightly, to make it stop causing modern gcov's to
Nick Lewycky [Thu, 5 May 2011 02:46:38 +0000 (02:46 +0000)]
Update the gcov version used slightly, to make it stop causing modern gcov's to
crash.

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

13 years agoRemove dead function.
Nick Lewycky [Thu, 5 May 2011 00:17:34 +0000 (00:17 +0000)]
Remove dead function.

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

13 years agoWhen the path wasn't emitted by the frontend, discard any path on the source
Nick Lewycky [Thu, 5 May 2011 00:03:30 +0000 (00:03 +0000)]
When the path wasn't emitted by the frontend, discard any path on the source
filename.

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

13 years agoDisable physical register coalescing by default.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:59:00 +0000 (23:59 +0000)]
Disable physical register coalescing by default.

Joining physregs is inherently dangerous because it uses a heuristic to avoid
creating invalid code. Linear scan had an emergency spilling mechanism to deal
with those rare cases. The new greedy allocator does not.

The greedy register allocator is much better at taking hints, so this has almost
no impact on code size and quality. The few cases where it matters show up as
unit tests that now have -join-physregs enabled explicitly.

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

13 years agoSet debug loc for new instructions.
Devang Patel [Wed, 4 May 2011 23:58:50 +0000 (23:58 +0000)]
Set debug loc for new instructions.

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

13 years agoSet debug location for new PHI nodes created in exit block.
Devang Patel [Wed, 4 May 2011 23:58:22 +0000 (23:58 +0000)]
Set debug location for new PHI nodes created in exit block.

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

13 years agoPrepare remaining tests for -join-physreg going away.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:54:59 +0000 (23:54 +0000)]
Prepare remaining tests for -join-physreg going away.

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

13 years agoFix X86RegisterInfo::getMatchingSuperRegClass for sub_8bit_hi.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:54:54 +0000 (23:54 +0000)]
Fix X86RegisterInfo::getMatchingSuperRegClass for sub_8bit_hi.

It is OK for B to be any GR8_ABCD_H superclass, the returned register class
doesn't have to map surjectively onto B.

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

13 years agoFix a batch of x86 tests to be coalescer independent.
Jakob Stoklund Olesen [Wed, 4 May 2011 23:54:51 +0000 (23:54 +0000)]
Fix a batch of x86 tests to be coalescer independent.

Most of these tests require a single mov instruction that can come either before
or after a 2-addr instruction. -join-physregs changes the behavior, but the
results are equivalent.

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

13 years agoDocument the automatic alias printing of InstAliases.
Bill Wendling [Wed, 4 May 2011 23:40:14 +0000 (23:40 +0000)]
Document the automatic alias printing of InstAliases.

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

13 years agoAdd explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
Ted Kremenek [Wed, 4 May 2011 23:26:59 +0000 (23:26 +0000)]
Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.

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

13 years agoGive this test an explicit register allocator, so that it can work even if
Dan Gohman [Wed, 4 May 2011 23:14:02 +0000 (23:14 +0000)]
Give this test an explicit register allocator, so that it can work even if
the default register allocator is changed.

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

13 years agoSjLj EH could produce a machine basic block that legitimately has more than one
Bill Wendling [Wed, 4 May 2011 22:54:05 +0000 (22:54 +0000)]
SjLj EH could produce a machine basic block that legitimately has more than one
landing pad as its successor.

SjLj exception handling jumps to the correct landing pad via a switch statement
that's generated right before code-gen. Loosen the constraint in the machine
instruction verifier to allow for this. Note, this isn't the most rigorous check
since we cannot determine where that switch statement came from. But it's
marginally better than turning this check off when SjLj exceptions are used.
<rdar://problem/9187612>

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

13 years agoPreserve line number information while threading jumps.
Devang Patel [Wed, 4 May 2011 22:48:19 +0000 (22:48 +0000)]
Preserve line number information while threading jumps.

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

13 years agoCreate the parent directories to place the .gcda files in if they don't exist.
Nick Lewycky [Wed, 4 May 2011 22:34:29 +0000 (22:34 +0000)]
Create the parent directories to place the .gcda files in if they don't exist.
That's kinda weird because the .gcno files are supposed to already be there,
but libgcov does this and somehow Google has managed to depend on it.

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

13 years agoRe-commit r130862 with a minor change to avoid an iterator running off the edge in...
Eli Friedman [Wed, 4 May 2011 22:10:36 +0000 (22:10 +0000)]
Re-commit r130862 with a minor change to avoid an iterator running off the edge in some cases.

Original message:

Teach MachineCSE how to do simple cross-block CSE involving physregs.  This allows, for example, eliminating duplicate cmpl's on x86. Part of rdar://problem/8259436 .

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

13 years agoPreserve line number info.
Devang Patel [Wed, 4 May 2011 21:58:58 +0000 (21:58 +0000)]
Preserve line number info.

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

13 years agoThis test fails on ARM. The test shouldn't explicitly specify alignment (and alignmen...
Galina Kistanova [Wed, 4 May 2011 21:57:44 +0000 (21:57 +0000)]
This test fails on ARM. The test shouldn't explicitly specify alignment (and alignment 4 is wrong) and requires hard-float.

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