oota-llvm.git
13 years agoTime the initial seeding of live registers
Jakob Stoklund Olesen [Mon, 11 Apr 2011 15:00:42 +0000 (15:00 +0000)]
Time the initial seeding of live registers

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

13 years agoDon't shrink live ranges after dead code elimination unless it is going to help.
Jakob Stoklund Olesen [Mon, 11 Apr 2011 15:00:39 +0000 (15:00 +0000)]
Don't shrink live ranges after dead code elimination unless it is going to help.

In particular, don't repeatedly recompute the PIC base live range after rematerialization.

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

13 years agoCMake: remove some unnecesary code and ToDos.
Oscar Fuentes [Mon, 11 Apr 2011 14:52:39 +0000 (14:52 +0000)]
CMake: remove some unnecesary code and ToDos.

Patch by arrowdodger!

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

13 years agoFix or remove code which seemed to think that the operand of a Constant
Jay Foad [Mon, 11 Apr 2011 09:48:55 +0000 (09:48 +0000)]
Fix or remove code which seemed to think that the operand of a Constant
was always a User.

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

13 years agoDon't include Operator.h from InstrTypes.h.
Jay Foad [Mon, 11 Apr 2011 09:35:34 +0000 (09:35 +0000)]
Don't include Operator.h from InstrTypes.h.

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

13 years agoPhi nodes always use an even number of operands, so don't ever allocate
Jay Foad [Mon, 11 Apr 2011 09:25:51 +0000 (09:25 +0000)]
Phi nodes always use an even number of operands, so don't ever allocate
an odd number.

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

13 years agodocs/CommandGuide/index.html: Fix CSS url to relative.
NAKAMURA Takumi [Mon, 11 Apr 2011 03:27:38 +0000 (03:27 +0000)]
docs/CommandGuide/index.html: Fix CSS url to relative.

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

13 years agodocs/CommandLine.html: "ize.
NAKAMURA Takumi [Mon, 11 Apr 2011 03:27:31 +0000 (03:27 +0000)]
docs/CommandLine.html: "ize.

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

13 years agoRevert r129235 pending a vetting of the EH rewrite.
Bill Wendling [Sun, 10 Apr 2011 23:18:04 +0000 (23:18 +0000)]
Revert r129235 pending a vetting of the EH rewrite.
--- Reverse-merging r129235 into '.':
D    test/Feature/bb_attrs.ll
U    include/llvm/BasicBlock.h
U    include/llvm/Bitcode/LLVMBitCodes.h
U    lib/VMCore/AsmWriter.cpp
U    lib/VMCore/BasicBlock.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/AsmParser/LLLexer.cpp
U    lib/AsmParser/LLToken.h
U    lib/Bitcode/Reader/BitcodeReader.cpp
U    lib/Bitcode/Writer/BitcodeWriter.cpp

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

13 years agoBugfix in the Cpp backend after API change on PHINode::Create.
Nicolas Geoffray [Sun, 10 Apr 2011 17:39:40 +0000 (17:39 +0000)]
Bugfix in the Cpp backend after API change on PHINode::Create.

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

13 years agoCMake: support for using LLVM from client projects with find_package.
Oscar Fuentes [Sun, 10 Apr 2011 16:17:49 +0000 (16:17 +0000)]
CMake: support for using LLVM from client projects with find_package.

Patch by arrowdodger!

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

13 years agoFixed more best practices, and explicit/implicit style guide issues.
Garrison Venn [Sun, 10 Apr 2011 14:06:52 +0000 (14:06 +0000)]
Fixed more best practices, and explicit/implicit style guide issues.

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

13 years agoReword instructions for running tests on Visual Studio.
Oscar Fuentes [Sun, 10 Apr 2011 01:41:55 +0000 (01:41 +0000)]
Reword instructions for running tests on Visual Studio.

Suggested by Maël Hörz.

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

13 years agoBeginning of the Great Exception Handling Rewrite.
Bill Wendling [Sun, 10 Apr 2011 00:04:27 +0000 (00:04 +0000)]
Beginning of the Great Exception Handling Rewrite.

* Add a "landing pad" attribute to the BasicBlock.
* Modify the bitcode reader and writer to handle said attribute.

Later: The verifier will ensure that the landing pad attribute is used in the
appropriate manner. I.e., not applied to the entry block, and applied only to
basic blocks that are branched to via a `dispatch' instruction.

(This is a work-in-progress.)

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

13 years agodrive by bug fix: DenseMapInfo::isEqual should be determined according to
Chris Lattner [Sat, 9 Apr 2011 21:20:23 +0000 (21:20 +0000)]
drive by bug fix: DenseMapInfo::isEqual should be determined according to
isEqual of its members, not operator==.

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

13 years agoLLVMCC_EMITIR_FLAG is already either -emit-llvm or -fplugin-arg-dragonegg-emit-ir...
Chris Lattner [Sat, 9 Apr 2011 19:56:28 +0000 (19:56 +0000)]
LLVMCC_EMITIR_FLAG is already either -emit-llvm or -fplugin-arg-dragonegg-emit-ir, so don't add an extra leading -.  Clang doesn't accept --emit-llvm.

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

13 years agomake stuff work when LLVMCC_OPTION is something like installed-clang, not just clang.
Chris Lattner [Sat, 9 Apr 2011 19:53:16 +0000 (19:53 +0000)]
make stuff work when LLVMCC_OPTION is something like installed-clang, not just clang.

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

13 years agofix rdar://8735979 - "int 3" doesn't match to "int3". Unfortunately,
Chris Lattner [Sat, 9 Apr 2011 19:41:05 +0000 (19:41 +0000)]
fix rdar://8735979 - "int 3" doesn't match to "int3".  Unfortunately,
InstAlias doesn't allow matching immediate operands, so we have to write
C++ code to do this.

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

13 years agolook for the verboten argument slot access in any order, thanks to Frits
Chris Lattner [Sat, 9 Apr 2011 17:00:34 +0000 (17:00 +0000)]
look for the verboten argument slot access in any order, thanks to Frits
for pointing this out

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

13 years agoFix potential buffer overflow on win32.
Benjamin Kramer [Sat, 9 Apr 2011 14:06:12 +0000 (14:06 +0000)]
Fix potential buffer overflow on win32.

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

13 years agoDon't store Twine temporaries, it's not safe.
Benjamin Kramer [Sat, 9 Apr 2011 11:26:27 +0000 (11:26 +0000)]
Don't store Twine temporaries, it's not safe.

And don't append the name over and over again in the loop.

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

13 years agoMake error message more useful.
Benjamin Kramer [Sat, 9 Apr 2011 10:10:35 +0000 (10:10 +0000)]
Make error message more useful.

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

13 years agodocs/*.html: Make W3C HTML 4.01 Strict more compliant.
NAKAMURA Takumi [Sat, 9 Apr 2011 09:51:57 +0000 (09:51 +0000)]
docs/*.html: Make W3C HTML 4.01 Strict more compliant.

FIXME: The logo handling in ReleaseNotes.html

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

13 years agoAdd back a couple checks removed by r129128; the fact that an intitializer
Eli Friedman [Sat, 9 Apr 2011 09:11:09 +0000 (09:11 +0000)]
Add back a couple checks removed by r129128; the fact that an intitializer
is an array of structures doesn't imply it's a ConstantArray of
ConstantStruct.

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

13 years agofix PR9523, a crash in looprotate on a non-canonical loop made out of indirectbr.
Chris Lattner [Sat, 9 Apr 2011 07:25:58 +0000 (07:25 +0000)]
fix PR9523, a crash in looprotate on a non-canonical loop made out of indirectbr.

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

13 years agoFix a bug where RecursivelyDeleteTriviallyDeadInstructions could
Chris Lattner [Sat, 9 Apr 2011 07:05:44 +0000 (07:05 +0000)]
Fix a bug where RecursivelyDeleteTriviallyDeadInstructions could
delete the instruction pointed to by CGP's current instruction
iterator, leading to a crash on the testcase.  This fixes PR9578.

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

13 years agoAvoid excess precision issues that lead to generating host-compiler-specific code.
Chris Lattner [Sat, 9 Apr 2011 06:57:13 +0000 (06:57 +0000)]
Avoid excess precision issues that lead to generating host-compiler-specific code.
Switch lowering probably shouldn't be using FP for this.  This resolves PR9581.

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

13 years agoPR9604; try to deal with RAUW updates correctly in the AST. I'm not convinced
Eli Friedman [Sat, 9 Apr 2011 06:55:46 +0000 (06:55 +0000)]
PR9604; try to deal with RAUW updates correctly in the AST.  I'm not convinced
it's completely safe to cache the AST across LICM runs even with this fix,
but this fix can't hurt.

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

13 years agoTest for r129190.
Eli Friedman [Sat, 9 Apr 2011 06:39:43 +0000 (06:39 +0000)]
Test for r129190.

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

13 years agofix PR9629 - We were lowering regexes like a{{b|c}}d into ab|cd, which
Chris Lattner [Sat, 9 Apr 2011 06:37:03 +0000 (06:37 +0000)]
fix PR9629 - We were lowering regexes like a{{b|c}}d into ab|cd, which
is substantially different than a(b|c)d.  Form the latter regex instead.
This found a few problems in the testsuite, which serves as its test.

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

13 years agofix two completely broken tests, which were matching due to PR9629.
Chris Lattner [Sat, 9 Apr 2011 06:34:38 +0000 (06:34 +0000)]
fix two completely broken tests, which were matching due to PR9629.

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

13 years agoremove a bunch of CHECK lines that aren't checking what
Chris Lattner [Sat, 9 Apr 2011 06:31:06 +0000 (06:31 +0000)]
remove a bunch of CHECK lines that aren't checking what
they thought they were, because alternation was expanding
wrong in {{}}'s.

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

13 years agoregexes are allowed to match empty things, e.g. {{.*}} in filecheck.
Chris Lattner [Sat, 9 Apr 2011 06:29:24 +0000 (06:29 +0000)]
regexes are allowed to match empty things, e.g. {{.*}} in filecheck.

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

13 years agovarious cleanups, no functionality change.
Chris Lattner [Sat, 9 Apr 2011 06:18:02 +0000 (06:18 +0000)]
various cleanups, no functionality change.

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

13 years agorevert accidental commit.
Chris Lattner [Sat, 9 Apr 2011 06:01:28 +0000 (06:01 +0000)]
revert accidental commit.

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

13 years agofix a potentially serious bug in AliasSet::removeCallSite
Chris Lattner [Sat, 9 Apr 2011 05:51:34 +0000 (05:51 +0000)]
fix a potentially serious bug in AliasSet::removeCallSite
where we shrunk the list without updating the end iterator.
By inspection, from PR9639.

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

13 years agoBuild the Hopfield network incrementally when splitting global live ranges.
Jakob Stoklund Olesen [Sat, 9 Apr 2011 02:59:09 +0000 (02:59 +0000)]
Build the Hopfield network incrementally when splitting global live ranges.

It is common for large live ranges to have few basic blocks with register uses
and many live-through blocks without any uses. This approach grows the Hopfield
network incrementally around the use blocks, completely avoiding checking
interference for some through blocks.

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

13 years agoPrecompute interference for neighbor blocks as long as there is no interference.
Jakob Stoklund Olesen [Sat, 9 Apr 2011 02:59:05 +0000 (02:59 +0000)]
Precompute interference for neighbor blocks as long as there is no interference.

This doesn't require seeking in the live interval union, so it is very cheap.

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

13 years agofix doc comment bug, noticed by Jochen
Chris Lattner [Sat, 9 Apr 2011 02:33:29 +0000 (02:33 +0000)]
fix doc comment bug, noticed by Jochen

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

13 years agohave dag combine zap "store undef", which can be formed during call lowering
Chris Lattner [Sat, 9 Apr 2011 02:32:02 +0000 (02:32 +0000)]
have dag combine zap "store undef", which can be formed during call lowering
with undef arguments.

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

13 years agodon't test for codegen of 'store undef'
Chris Lattner [Sat, 9 Apr 2011 02:31:26 +0000 (02:31 +0000)]
don't test for codegen of 'store undef'

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

13 years agodocs/tutorial/OCamlLangImpl7.html: Fix a href to missing Chapter 8.
NAKAMURA Takumi [Sat, 9 Apr 2011 02:14:41 +0000 (02:14 +0000)]
docs/tutorial/OCamlLangImpl7.html: Fix a href to missing Chapter 8.

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

13 years agodocs: Fix some in-package URLs.
NAKAMURA Takumi [Sat, 9 Apr 2011 02:13:48 +0000 (02:13 +0000)]
docs: Fix some in-package URLs.

(eg. trim http://llvm.org/docs/foo -> foo)

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

13 years agodocs: Canonicalize URLs.
NAKAMURA Takumi [Sat, 9 Apr 2011 02:13:37 +0000 (02:13 +0000)]
docs: Canonicalize URLs.

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

13 years agoRedirected errors from the AsmParser to the proper
Sean Callanan [Sat, 9 Apr 2011 00:37:25 +0000 (00:37 +0000)]
Redirected errors from the AsmParser to the proper
error stream, in cases where the AsmParser is
being invoked by EDDisassembler.  Before, they
were being sent to errs() because no error handler
was installed in the SourceMgr.

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

13 years agoMoved an access to an object past a NULL check,
Sean Callanan [Sat, 9 Apr 2011 00:21:04 +0000 (00:21 +0000)]
Moved an access to an object past a NULL check,
making the MC disassembler tester more robust.

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

13 years agoAdd radar number for future reference.
Devang Patel [Fri, 8 Apr 2011 23:52:04 +0000 (23:52 +0000)]
Add radar number for future reference.

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

13 years agoSimplify array bound checks and clarify comments. One element array can have same...
Devang Patel [Fri, 8 Apr 2011 23:39:38 +0000 (23:39 +0000)]
Simplify array bound checks and clarify comments.  One element array can have same non-zero number as lower bound as well as upper bound.

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

13 years agoAdd a function for profiling to run at shutdown. Unlike the existing API, this
Nick Lewycky [Fri, 8 Apr 2011 22:19:52 +0000 (22:19 +0000)]
Add a function for profiling to run at shutdown. Unlike the existing API, this
can be used even when main() isn't present in the Module, but it means that you
don't get to read argv[].

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

13 years agoFix an apparent typo that made GCC complain
Matt Beaumont-Gay [Fri, 8 Apr 2011 21:59:49 +0000 (21:59 +0000)]
Fix an apparent typo that made GCC complain

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

13 years agoDo not emit DW_AT_upper_bound and DW_AT_lower_bound for unbouded array.
Devang Patel [Fri, 8 Apr 2011 21:55:10 +0000 (21:55 +0000)]
Do not emit DW_AT_upper_bound and DW_AT_lower_bound for unbouded array.
If lower bound is more then upper bound then consider it is an unbounded array.
An array is unbounded if non-zero lower bound is same as upper bound.
If lower bound and upper bound are zero than array has one element.

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

13 years agoMissing closed tag.
Bill Wendling [Fri, 8 Apr 2011 21:43:08 +0000 (21:43 +0000)]
Missing closed tag.

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

13 years agoChange -arm-trap-func= into a non-arm specific option. Now Intrinsic::trap is lowered...
Evan Cheng [Fri, 8 Apr 2011 21:37:21 +0000 (21:37 +0000)]
Change -arm-trap-func= into a non-arm specific option. Now Intrinsic::trap is lowered into a call to the specified trap function at sdisel time.

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

13 years agoWorkaround g++ 4.2.1 warning diagnostic false positive.
Jim Grosbach [Fri, 8 Apr 2011 21:11:20 +0000 (21:11 +0000)]
Workaround g++ 4.2.1 warning diagnostic false positive.

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

13 years agoCheck opcoe (dmb, dsb) instead of bitfields matching.
Johnny Chen [Fri, 8 Apr 2011 20:03:46 +0000 (20:03 +0000)]
Check opcoe (dmb, dsb) instead of bitfields matching.

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

13 years agoHanlde the checking of bad regs for SMMLAR properly, instead of asserting.
Johnny Chen [Fri, 8 Apr 2011 19:41:22 +0000 (19:41 +0000)]
Hanlde the checking of bad regs for SMMLAR properly, instead of asserting.

PR9650
rdar://problem/9257565

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

13 years agoSanity check the option operand for DMB/DSB.
Johnny Chen [Fri, 8 Apr 2011 19:18:07 +0000 (19:18 +0000)]
Sanity check the option operand for DMB/DSB.

PR9648
rdar://problem/9257634

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

13 years agoMark hasExtraDefRegAllocReq=1 on LDRD.
Jim Grosbach [Fri, 8 Apr 2011 18:47:05 +0000 (18:47 +0000)]
Mark hasExtraDefRegAllocReq=1 on LDRD.

The previous cleanup of LDRD got overzealous and removed it, causing post-RA
scheduling to get overzealous in breaking antidependencies and invalidate these instructions. Hilarity and invalid assembly ensued.

rdar://9244161

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

13 years agoreindent this whole file and do a variety of stylistic cleanups.
Chris Lattner [Fri, 8 Apr 2011 18:02:51 +0000 (18:02 +0000)]
reindent this whole file and do a variety of stylistic cleanups.
This code is still a long way from following best practices.

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

13 years agofix this to build with the recent StructType changes.
Chris Lattner [Fri, 8 Apr 2011 17:56:47 +0000 (17:56 +0000)]
fix this to build with the recent StructType changes.

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

13 years agoRefactor MCJIT 32-bit section loading.
Jim Grosbach [Fri, 8 Apr 2011 17:31:24 +0000 (17:31 +0000)]
Refactor MCJIT 32-bit section loading.

Teach 32-bit section loading to use the Memory Manager interface, just like
the 64-bit loading does. Tidy up a few other things here and there.

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

13 years agoMOVi16 and MOVTi16 does not allow pc as the dest register, while MOVi allows it.
Johnny Chen [Fri, 8 Apr 2011 17:29:58 +0000 (17:29 +0000)]
MOVi16 and MOVTi16 does not allow pc as the dest register, while MOVi allows it.
Add tests for that.

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

13 years agollvm.global_[cd]tor is defined to be either external, or appending with an array
Nick Lewycky [Fri, 8 Apr 2011 07:30:21 +0000 (07:30 +0000)]
llvm.global_[cd]tor is defined to be either external, or appending with an array
of { i32, void ()* }. Teach the verifier to verify that, deleting copies of
checks strewn about.

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

13 years agoOnly emit the AvailableFeatures variable if it's used.
Bill Wendling [Fri, 8 Apr 2011 04:08:57 +0000 (04:08 +0000)]
Only emit the AvailableFeatures variable if it's used.

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

13 years agoAlso add the late notes for Mips in the current release note
Bruno Cardoso Lopes [Fri, 8 Apr 2011 03:06:22 +0000 (03:06 +0000)]
Also add the late notes for Mips in the current release note

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

13 years agoAdd sanity checking for bad register specifier(s) for the DPFrm instructions.
Johnny Chen [Fri, 8 Apr 2011 00:29:09 +0000 (00:29 +0000)]
Add sanity checking for bad register specifier(s) for the DPFrm instructions.
Add more test cases to exercise the logical branches related to the above change.

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

13 years agoUpdate tests
Rafael Espindola [Thu, 7 Apr 2011 23:51:25 +0000 (23:51 +0000)]
Update tests

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

13 years agoMicro optimization and improved similarity with gas' output:
Rafael Espindola [Thu, 7 Apr 2011 23:21:52 +0000 (23:21 +0000)]
Micro optimization and improved similarity with gas' output:
When two section names share a suffix, reuse the entry in shstrtab.

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

13 years agoDo not let debug info interfer with branch folding.
Devang Patel [Thu, 7 Apr 2011 23:11:25 +0000 (23:11 +0000)]
Do not let debug info interfer with branch folding.

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

13 years agoAdd a VEXT test.
Johnny Chen [Thu, 7 Apr 2011 22:04:01 +0000 (22:04 +0000)]
Add a VEXT test.

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

13 years agoReplace the old algorithm that emitted the "print the alias for an instruction"
Bill Wendling [Thu, 7 Apr 2011 21:20:06 +0000 (21:20 +0000)]
Replace the old algorithm that emitted the "print the alias for an instruction"
with the newer, cleaner model. It uses the IAPrinter class to hold the
information that is needed to match an instruction with its alias. This also
takes into account the available features of the platform.

There is one bit of ugliness. The way the logic determines if a pattern is
unique is O(N**2), which is gross. But in reality, the number of items it's
checking against isn't large. So while it's N**2, it shouldn't be a massive time
sink.

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

13 years agoIf present, use gold's support for getting a file view. This prevents having
Rafael Espindola [Thu, 7 Apr 2011 21:11:00 +0000 (21:11 +0000)]
If present, use gold's support for getting a file view. This prevents having
to map the file both in the linker and in the plugin.

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

13 years agoAdd option to emit @llvm.trap as a function call instead of a trap instruction. rdar...
Evan Cheng [Thu, 7 Apr 2011 20:31:12 +0000 (20:31 +0000)]
Add option to emit @llvm.trap as a function call instead of a trap instruction. rdar://9249183.

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

13 years agoAdd support for .skip.
Rafael Espindola [Thu, 7 Apr 2011 20:26:23 +0000 (20:26 +0000)]
Add support for .skip.
Patch by Roman Divacky.
Fixes PR9361.

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

13 years agoFix indentation.
Akira Hatanaka [Thu, 7 Apr 2011 20:25:10 +0000 (20:25 +0000)]
Fix indentation.

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

13 years agoUpdate ATUsed every time after expandRegLargeImmPair is called.
Akira Hatanaka [Thu, 7 Apr 2011 20:23:26 +0000 (20:23 +0000)]
Update ATUsed every time after expandRegLargeImmPair is called.

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

13 years agoFixed encoding for VEXTqf
Mon P Wang [Thu, 7 Apr 2011 19:56:12 +0000 (19:56 +0000)]
Fixed encoding for VEXTqf

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

13 years agoAdded a check in the preRA scheduler for potential interference on a
Andrew Trick [Thu, 7 Apr 2011 19:54:57 +0000 (19:54 +0000)]
Added a check in the preRA scheduler for potential interference on a
induction variable. The preRA scheduler is unaware of induction vars,
so we look for potential "virtual register cycles" instead.

Fixes <rdar://problem/8946719> Bad scheduling prevents coalescing

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

13 years agoFix handling of functions with internal linkage.
Akira Hatanaka [Thu, 7 Apr 2011 19:51:44 +0000 (19:51 +0000)]
Fix handling of functions with internal linkage.

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

13 years agoAdd sanity checking for invalid register encodings for signed/unsigned extend instruc...
Johnny Chen [Thu, 7 Apr 2011 19:28:58 +0000 (19:28 +0000)]
Add sanity checking for invalid register encodings for signed/unsigned extend instructions.
Add some test cases.

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

13 years agoAdd sanity checking for invalid register encodings for saturating instructions.
Johnny Chen [Thu, 7 Apr 2011 19:02:08 +0000 (19:02 +0000)]
Add sanity checking for invalid register encodings for saturating instructions.

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

13 years agoRecompute hasPHIKill flags when shrinking live intervals.
Jakob Stoklund Olesen [Thu, 7 Apr 2011 18:43:14 +0000 (18:43 +0000)]
Recompute hasPHIKill flags when shrinking live intervals.

PHI values may be deleted, causing the flags to be wrong. This fixes PR9616.

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

13 years agoAdd some more comments about checkings of invalid register numbers.
Johnny Chen [Thu, 7 Apr 2011 18:33:19 +0000 (18:33 +0000)]
Add some more comments about checkings of invalid register numbers.
And two test cases.

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

13 years agoExpose more passes to the C API.
Rafael Espindola [Thu, 7 Apr 2011 18:20:46 +0000 (18:20 +0000)]
Expose more passes to the C API.

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

13 years agoAvoid moving iterators when the previous block was just visited.
Jakob Stoklund Olesen [Thu, 7 Apr 2011 17:27:50 +0000 (17:27 +0000)]
Avoid moving iterators when the previous block was just visited.

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

13 years agoPrefer multiplications to divisions.
Jakob Stoklund Olesen [Thu, 7 Apr 2011 17:27:48 +0000 (17:27 +0000)]
Prefer multiplications to divisions.

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

13 years agoExtract SpillPlacement::addLinks for handling the special transparent blocks.
Jakob Stoklund Olesen [Thu, 7 Apr 2011 17:27:46 +0000 (17:27 +0000)]
Extract SpillPlacement::addLinks for handling the special transparent blocks.

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

13 years agoWhile hoisting common code from if/else, hoist debug info intrinsics if they match.
Devang Patel [Thu, 7 Apr 2011 17:27:36 +0000 (17:27 +0000)]
While hoisting common code from if/else, hoist debug info intrinsics if they match.

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

13 years agoPrevent ARM DAG Combiner from doing an AND or OR combine on an illegal vector type...
Tanya Lattner [Thu, 7 Apr 2011 15:24:20 +0000 (15:24 +0000)]
Prevent ARM DAG Combiner from doing an AND or OR combine on an illegal vector type (vectors of size 3). Also included test cases.

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

13 years agoFix a bit of nonsense.
Jay Foad [Thu, 7 Apr 2011 12:41:09 +0000 (12:41 +0000)]
Fix a bit of nonsense.

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

13 years agoadd faust too
Chris Lattner [Thu, 7 Apr 2011 03:09:21 +0000 (03:09 +0000)]
add faust too

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

13 years agoadd a few late stragglers.
Chris Lattner [Thu, 7 Apr 2011 03:08:22 +0000 (03:08 +0000)]
add a few late stragglers.

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

13 years agoFixed a bug where missing EDInstInfo would cause
Sean Callanan [Thu, 7 Apr 2011 01:56:01 +0000 (01:56 +0000)]
Fixed a bug where missing EDInstInfo would cause
tokenization to crash and burn.

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

13 years agoSanity check MSRi for invalid mask values and reject it as invalid.
Johnny Chen [Thu, 7 Apr 2011 01:37:34 +0000 (01:37 +0000)]
Sanity check MSRi for invalid mask values and reject it as invalid.

rdar://problem/9246844

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

13 years agoPR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad
Eli Friedman [Thu, 7 Apr 2011 01:35:06 +0000 (01:35 +0000)]
PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad
is equivalent to any other relevant value; it isn't true in general.
If it is equivalent, the LoopPromoter will tell the AST the equivalence.
Also, delete the PreheaderLoad if it is unused.

Chris, since you were the last one to make major changes here, can you check
that this is sane?

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

13 years agoThe ARM disassembler was not recognizing USADA8 instruction. Need to add checking...
Johnny Chen [Thu, 7 Apr 2011 01:05:52 +0000 (01:05 +0000)]
The ARM disassembler was not recognizing USADA8 instruction.  Need to add checking for register values
for USAD8 and USADA8.

rdar://problem/9247060

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

13 years agoChange -arm-divmod-libcall to a target neutral option.
Evan Cheng [Thu, 7 Apr 2011 00:58:44 +0000 (00:58 +0000)]
Change -arm-divmod-libcall to a target neutral option.

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

13 years agoRemove dead code. rdar://9221736.
Evan Cheng [Thu, 7 Apr 2011 00:56:37 +0000 (00:56 +0000)]
Remove dead code. rdar://9221736.

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

13 years agoShould also check SMLAD for invalid register values.
Johnny Chen [Thu, 7 Apr 2011 00:50:25 +0000 (00:50 +0000)]
Should also check SMLAD for invalid register values.

rdar://problem/9246650

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

13 years agoSimplify. isIdenticalToWhenDefined() checks opcode.
Devang Patel [Thu, 7 Apr 2011 00:30:15 +0000 (00:30 +0000)]
Simplify. isIdenticalToWhenDefined() checks opcode.

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