oota-llvm.git
10 years agoDon't end a file name with a dot. It looks odd.
Rafael Espindola [Thu, 25 Jul 2013 15:00:17 +0000 (15:00 +0000)]
Don't end a file name with a dot. It looks odd.

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

10 years agoAArch64: don't mask off shift bits when processing JIT relocations.
Tim Northover [Thu, 25 Jul 2013 12:42:52 +0000 (12:42 +0000)]
AArch64: don't mask off shift bits when processing JIT relocations.

This should actually make the MCJIT tests pass again on AArch64. I don't know
how I missed their failure before.

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

10 years agoFix a bug in TableGen where the intrinsic function name recognizer could mis-identify...
Justin Holewinski [Thu, 25 Jul 2013 12:32:00 +0000 (12:32 +0000)]
Fix a bug in TableGen where the intrinsic function name recognizer could mis-identify names if one was a prefix substring of the other

For two intrinsics 'llvm.nvvm.texsurf.handle' and 'llvm.nvvm.texsurf.handle.internal',
TableGen was emitting matching code like:

  if (Name.startswith("llvm.nvvm.texsurf.handle")) ...
  if (Name.startswith("llvm.nvvm.texsurf.handle.internal")) ...

We can never match "llvm.nvvm.texsurf.handle.internal" here because it will
always be erroneously matched by the first condition.

The fix is to sort the intrinsic names and emit them in reverse order.

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

10 years agoFix a comment cut-&-pasto.
Richard Sandiford [Thu, 25 Jul 2013 10:53:02 +0000 (10:53 +0000)]
Fix a comment cut-&-pasto.

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

10 years ago[SystemZ] Rework compare and branch support
Richard Sandiford [Thu, 25 Jul 2013 09:34:38 +0000 (09:34 +0000)]
[SystemZ] Rework compare and branch support

Before the patch we took advantage of the fact that the compare and
branch are glued together in the selection DAG and fused them together
(where possible) while emitting them.  This seemed to work well in practice.
However, fusing the compare so early makes it harder to remove redundant
compares in cases where CC already has a suitable value.  This patch
therefore uses the peephole analyzeCompare/optimizeCompareInstr pair of
functions instead.

No behavioral change intended, but it paves the way for a later patch.

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

10 years ago[SystemZ] Add LOCR and LOCGR
Richard Sandiford [Thu, 25 Jul 2013 09:11:15 +0000 (09:11 +0000)]
[SystemZ] Add LOCR and LOCGR

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

10 years ago[SystemZ] Add LOC and LOCG
Richard Sandiford [Thu, 25 Jul 2013 09:04:52 +0000 (09:04 +0000)]
[SystemZ] Add LOC and LOCG

As with the stores, these instructions can trap when the condition is false,
so they are only used for things like (cond ? x : *ptr).

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

10 years ago[SystemZ] Add STOC and STOCG
Richard Sandiford [Thu, 25 Jul 2013 08:57:02 +0000 (08:57 +0000)]
[SystemZ] Add STOC and STOCG

These instructions are allowed to trap even if the condition is false,
so for now they are only used for "*ptr = (cond ? x : *ptr)"-style
constructs.

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

10 years agoMI Sched: Register pressure heuristics.
Andrew Trick [Thu, 25 Jul 2013 07:26:35 +0000 (07:26 +0000)]
MI Sched: Register pressure heuristics.

Consider which set is being increased or decreased before comparing.

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

10 years agoMI Sched: track register pressure by importance of the set, not weight of the units.
Andrew Trick [Thu, 25 Jul 2013 07:26:32 +0000 (07:26 +0000)]
MI Sched: track register pressure by importance of the set, not weight of the units.

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

10 years agoRegPressure: Order the "pressure sets" by number of regunits per set.
Andrew Trick [Thu, 25 Jul 2013 07:26:29 +0000 (07:26 +0000)]
RegPressure: Order the "pressure sets" by number of regunits per set.

This lets heuristics easily pick the most important set to follow.

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

10 years agoDump LIS before regalloc. MI sched changes them.
Andrew Trick [Thu, 25 Jul 2013 07:26:26 +0000 (07:26 +0000)]
Dump LIS before regalloc. MI sched changes them.

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

10 years agoDebug Info: improve the verifier to check field types.
Manman Ren [Thu, 25 Jul 2013 06:43:01 +0000 (06:43 +0000)]
Debug Info: improve the verifier to check field types.

Make sure the context and type fields are MDNodes. We will generate
verification errors if those fields are non-empty strings.
Fix testing cases to make them pass the verifier.

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

10 years agoRespect llvm.used in Internalize.
Rafael Espindola [Thu, 25 Jul 2013 03:23:25 +0000 (03:23 +0000)]
Respect llvm.used in Internalize.

The language reference says that:

"If a symbol appears in the @llvm.used list, then the compiler,
assembler, and linker are required to treat the symbol as if there is
a reference to the symbol that it cannot see"

Since even the linker cannot see the reference, we must assume that
the reference can be using the symbol table. For example, a user can add
__attribute__((used)) to a debug helper function like dump and use it from
a debugger.

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

10 years agoCheck that TD isn't NULL before dereferencing it down this path.
Nick Lewycky [Thu, 25 Jul 2013 02:55:14 +0000 (02:55 +0000)]
Check that TD isn't NULL before dereferencing it down this path.

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

10 years agoMake these methods const correct.
Rafael Espindola [Thu, 25 Jul 2013 02:50:08 +0000 (02:50 +0000)]
Make these methods const correct.

Thanks to Nick Lewycky for noticing it.

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

10 years agoReplace the "NoFramePointerElimNonLeaf" target option with a function attribute.
Bill Wendling [Thu, 25 Jul 2013 00:34:29 +0000 (00:34 +0000)]
Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.

There's no need to specify a flag to omit frame pointer elimination on non-leaf
nodes...(Honestly, I can't parse that option out.) Use the function attribute
stuff instead.

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

10 years agoAdd helpful accessor methods to get the specified function attribute.
Bill Wendling [Wed, 24 Jul 2013 23:45:00 +0000 (23:45 +0000)]
Add helpful accessor methods to get the specified function attribute.

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

10 years agoUpdate testing cases to pass debug info verifier.
Manman Ren [Wed, 24 Jul 2013 22:23:00 +0000 (22:23 +0000)]
Update testing cases to pass debug info verifier.

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

10 years agoSpeling.
Jakob Stoklund Olesen [Wed, 24 Jul 2013 20:47:57 +0000 (20:47 +0000)]
Speling.

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

10 years agoFix a bug in IfConverter with nested predicates.
Quentin Colombet [Wed, 24 Jul 2013 20:20:37 +0000 (20:20 +0000)]
Fix a bug in IfConverter with nested predicates.

Prior to this patch, IfConverter may widen the cases where a sequence of
instructions were executed because of the way it uses nested predicates. This
result in incorrect execution.

For instance, Let A be a basic block that flows conditionally into B and B be a
predicated block.
B can be predicated with A.BrToBPredicate into A iff B.Predicate is less
"permissive" than A.BrToBPredicate, i.e., iff A.BrToBPredicate subsumes
B.Predicate.

The IfConverter was checking the opposite: B.Predicate subsumes
A.BrToBPredicate.

<rdar://problem/14379453>

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

10 years agoUpdate testing cases to pass debug info verifier.
Manman Ren [Wed, 24 Jul 2013 18:56:43 +0000 (18:56 +0000)]
Update testing cases to pass debug info verifier.

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

10 years agoadd -disable-debug-info-verifier to 3 test to fix tests with pipefail.
Rafael Espindola [Wed, 24 Jul 2013 18:44:10 +0000 (18:44 +0000)]
add -disable-debug-info-verifier to 3 test to fix tests with pipefail.

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

10 years ago[mips] Make MipsAsmParser::parseCCRRegs return NoMatch instead of ParseFail
Akira Hatanaka [Wed, 24 Jul 2013 18:43:52 +0000 (18:43 +0000)]
[mips] Make MipsAsmParser::parseCCRRegs return NoMatch instead of ParseFail
when there wasn't a match. This behavior is consistent with other register
parsing methods.

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

10 years agoUpdate old llc documentation.
Jakob Stoklund Olesen [Wed, 24 Jul 2013 17:45:11 +0000 (17:45 +0000)]
Update old llc documentation.

Patch by Hafiz Abid!

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

10 years ago[mips] Remove XFAIL from test-ptr-reloc-remote.ll
Petar Jovanovic [Wed, 24 Jul 2013 17:14:05 +0000 (17:14 +0000)]
[mips] Remove XFAIL from test-ptr-reloc-remote.ll

The change r187019 has fixed multiple relocations in dynamic linker for
MIPS, so now this test passes for MIPS.

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

10 years agoDebug Info: improve the Finder.
Manman Ren [Wed, 24 Jul 2013 17:10:09 +0000 (17:10 +0000)]
Debug Info: improve the Finder.

Improve the Finder to handle context of a DIVariable used by DbgValueInst.
Fix testing cases to make them pass the verifier.

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

10 years agoTRE: Move class into anonymous namespace.
Benjamin Kramer [Wed, 24 Jul 2013 16:12:08 +0000 (16:12 +0000)]
TRE: Move class into anonymous namespace.

While there shrink a dangerously large SmallPtrSet.

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

10 years agoUpdate testing cases to pass debug info verifier.
Manman Ren [Wed, 24 Jul 2013 15:55:41 +0000 (15:55 +0000)]
Update testing cases to pass debug info verifier.

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

10 years agoAdd -disable-debug-info-verifier to a RUN line.
Rafael Espindola [Wed, 24 Jul 2013 14:56:31 +0000 (14:56 +0000)]
Add -disable-debug-info-verifier to a RUN line.

Found by running the test with pipefail enabled.

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

10 years agoDon't leak when expanding response files.
Rafael Espindola [Wed, 24 Jul 2013 14:32:01 +0000 (14:32 +0000)]
Don't leak when expanding response files.

Before this patch we would strdup each argument. If one was a response file,
we would replace it with the response file contents, leaking the original
strdup result.

We now don't strdup the originals and let StringSaver free any memory it
allocated. This also saves a bit of malloc traffic when response files are
not used.

Leak found by the valgrind build bot.

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

10 years agoDelete the buffer in createObjectFile if it fails.
Rafael Espindola [Wed, 24 Jul 2013 14:00:26 +0000 (14:00 +0000)]
Delete the buffer in createObjectFile if it fails.

The Binary constructor takes ownership of the memory buffer. This is a fairly
unfortunate interface, but for now make createObjectFile consistent with it
by also deleting the buffer if it fails.

Fixes a leak in llvm-ar found by the valgrind bots.

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

10 years agollvm-ar is far closer to being a regular ar implementation now. Update the docs.
Rafael Espindola [Wed, 24 Jul 2013 13:13:24 +0000 (13:13 +0000)]
llvm-ar is far closer to being a regular ar implementation now. Update the docs.

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

10 years ago[test commit] Minor comment change.
Petar Jovanovic [Wed, 24 Jul 2013 13:02:35 +0000 (13:02 +0000)]
[test commit] Minor comment change.

Testing commit access credentials.

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

10 years agoFix a problem I introduced in r187029 where we would over-eagerly
Chandler Carruth [Wed, 24 Jul 2013 12:12:17 +0000 (12:12 +0000)]
Fix a problem I introduced in r187029 where we would over-eagerly
schedule an alloca for another iteration in SROA. This only showed up
with a mixture of promotable and unpromotable selects and phis. Added
a test case for this.

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

10 years agoI'm starting to commit KNL backend. I'll push patches one-by-one. This patch includes...
Elena Demikhovsky [Wed, 24 Jul 2013 11:02:47 +0000 (11:02 +0000)]
I'm starting to commit KNL backend. I'll push patches one-by-one. This patch includes support for the extended register set XMM16-31, YMM16-31, ZMM0-31.
The full ISA you can see here: http://software.intel.com/en-us/intel-isa-extensions

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

10 years agoFix PR16687 where we were incorrectly promoting an alloca that had
Chandler Carruth [Wed, 24 Jul 2013 09:47:28 +0000 (09:47 +0000)]
Fix PR16687 where we were incorrectly promoting an alloca that had
pending speculation for a phi node. The problem here is that we were
using growth of the specluation set as an indicator of whether
speculation would occur, and if the phi node is already in the set we
don't see it grow. This is a symptom of the fact that this signal is
a total hack.

Unfortunately, I couldn't really come up with a non-hacky way of
signaling that promotion remains valid *after* speculation occurs, such
that we only speculate when all else looks good for promotion. In the
end, I went with at least a much more explicit approach of doing the
work of queuing inside the phi and select processing and setting
a preposterously named flag to convey that we're in the special state of
requiring speculating before promotion.

Thanks to Richard Trieu and Nick Lewycky for the excellent work reducing
a testcase for this from a pretty giant, nasty assert in a big
application. =] The testcase was excellent.

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

10 years agoallow tests to run on powerpc-darwin8 again, checking for __ppc__
David Fang [Wed, 24 Jul 2013 07:52:16 +0000 (07:52 +0000)]
allow tests to run on powerpc-darwin8 again, checking for __ppc__

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

10 years agoSplit generated asm mnemonic matching table into a separate table for each asm variant.
Craig Topper [Wed, 24 Jul 2013 07:33:14 +0000 (07:33 +0000)]
Split generated asm mnemonic matching table into a separate table for each asm variant.

This removes the need to store the asm variant in each row of the single table that existed before. Shaves ~16K off the size of X86AsmParser.o.

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

10 years agoRevert accidental commit.
Craig Topper [Wed, 24 Jul 2013 04:52:55 +0000 (04:52 +0000)]
Revert accidental commit.

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

10 years agoFix aliases for shrd/shld to handle Intel syntax properly. Also suppress them from...
Craig Topper [Wed, 24 Jul 2013 04:38:13 +0000 (04:38 +0000)]
Fix aliases for shrd/shld to handle Intel syntax properly. Also suppress them from being used by the asm printer.

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

10 years ago[mips] Use pristine object file while processing relocations.
Akira Hatanaka [Wed, 24 Jul 2013 01:58:40 +0000 (01:58 +0000)]
[mips] Use pristine object file while processing relocations.

    Similar to ARM change r182800, dynamic linker will read bits/addends from
    the original object rather than from the object that might have been patched
    previously. For the purpose of relocations for MCJIT stubs on MIPS, we
    internally use otherwise unused MIPS relocations.

    The change also enables MCJIT unit tests for MIPS (EL/BE), and the following
    two tests now pass:

    - MCJITTest.return_global and
    - MCJITTest.multiple_functions.

    These issues have been tracked as Bug 16250.

    Patch by Petar Jovanovic.

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

10 years agoReplace with a "null" RAUW with an assert since we'd actually like
Eric Christopher [Wed, 24 Jul 2013 01:51:12 +0000 (01:51 +0000)]
Replace with a "null" RAUW with an assert since we'd actually like
to assume we're replacing. Clarify comments.

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

10 years agoRemove dead code.
Eric Christopher [Wed, 24 Jul 2013 01:38:05 +0000 (01:38 +0000)]
Remove dead code.

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

10 years agoUpdate testing cases to make them pass debug info verification.
Manman Ren [Wed, 24 Jul 2013 01:26:37 +0000 (01:26 +0000)]
Update testing cases to make them pass debug info verification.

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

10 years agoRemove unnecessary constructors as the default conversions will handle
Eric Christopher [Wed, 24 Jul 2013 01:21:02 +0000 (01:21 +0000)]
Remove unnecessary constructors as the default conversions will handle
all enumerated cases. Reformat the rest of the existing constructors to
match.

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

10 years agoMore constructor cleanup.
Eric Christopher [Wed, 24 Jul 2013 01:06:21 +0000 (01:06 +0000)]
More constructor cleanup.

Move to a single constructor with a default argument and avoid
the check and nullification.

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

10 years agoCollapse logic and move and reword comment for clarity.
Eric Christopher [Wed, 24 Jul 2013 00:54:39 +0000 (00:54 +0000)]
Collapse logic and move and reword comment for clarity.

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

10 years agoAdd a fixme and reformat.
Eric Christopher [Wed, 24 Jul 2013 00:54:36 +0000 (00:54 +0000)]
Add a fixme and reformat.

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

10 years agoRemove one more of these.
Eric Christopher [Wed, 24 Jul 2013 00:36:11 +0000 (00:36 +0000)]
Remove one more of these.

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

10 years agoRemove more dead/weird/misleading code.
Eric Christopher [Wed, 24 Jul 2013 00:15:01 +0000 (00:15 +0000)]
Remove more dead/weird/misleading code.

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

10 years agoRemove more seemingly unused code.
Eric Christopher [Wed, 24 Jul 2013 00:13:02 +0000 (00:13 +0000)]
Remove more seemingly unused code.

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

10 years agoDAGCombiner: Pass the correct type to TargetLowering::isF(Abs|Neg)Free
Tom Stellard [Tue, 23 Jul 2013 23:55:03 +0000 (23:55 +0000)]
DAGCombiner: Pass the correct type to TargetLowering::isF(Abs|Neg)Free

This commit also implements these functions for R600 and removes a test
case that was relying on the buggy behavior.

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

10 years agoR600: Treat CONSTANT_ADDRESS loads like GLOBAL_ADDRESS loads when necessary
Tom Stellard [Tue, 23 Jul 2013 23:54:56 +0000 (23:54 +0000)]
R600: Treat CONSTANT_ADDRESS loads like GLOBAL_ADDRESS loads when necessary

These are really the same address space in hardware.  The only
difference is that CONSTANT_ADDRESS uses a special cache for faster
access.  When we are unable to use the constant kcache for some reason
(e.g. smaller types or lack of indirect addressing) then the instruction
selector must use GLOBAL_ADDRESS loads instead.

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

10 years agoDebug Info: improve the Finder.
Manman Ren [Tue, 23 Jul 2013 23:10:00 +0000 (23:10 +0000)]
Debug Info: improve the Finder.

Improve the Finder to handle context of a DIVariable.
If Scope is a DICompileUnit, add it to the list of CUs.

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

10 years agoDebug Info: clean up.
Manman Ren [Tue, 23 Jul 2013 23:07:38 +0000 (23:07 +0000)]
Debug Info: clean up.

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

10 years agoRemove unused function.
Eric Christopher [Tue, 23 Jul 2013 22:50:42 +0000 (22:50 +0000)]
Remove unused function.

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

10 years ago[ARM][ISel] Improve the lowering of vector loads.
Quentin Colombet [Tue, 23 Jul 2013 22:34:47 +0000 (22:34 +0000)]
[ARM][ISel] Improve the lowering of vector loads.

When vectors are built from a single value, the ARM lowering issues a
scalar_to_vector node.
This node is then always morphed into a move from the general purpose unit to
the vector unit.
When the value comes from a load, this can be simplified into a vector load to
the right lane.

This patch changes the lowering of insert_vector_elt to expose a vector
friendly pattern in this situation.

This is a step toward fixing <rdar://problem/14170854>.

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

10 years agoKeep similar classes near each other. No functional change.
Eric Christopher [Tue, 23 Jul 2013 22:29:19 +0000 (22:29 +0000)]
Keep similar classes near each other. No functional change.

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

10 years agoFix spelling
Matt Arsenault [Tue, 23 Jul 2013 22:20:57 +0000 (22:20 +0000)]
Fix spelling

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

10 years ago80-column.
Eric Christopher [Tue, 23 Jul 2013 22:16:44 +0000 (22:16 +0000)]
80-column.

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

10 years agoReformat options.
Eric Christopher [Tue, 23 Jul 2013 22:16:41 +0000 (22:16 +0000)]
Reformat options.

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

10 years agoExpand the comment on getOpenFileSlice a bit for more details and consistency
Eli Bendersky [Tue, 23 Jul 2013 21:05:21 +0000 (21:05 +0000)]
Expand the comment on getOpenFileSlice a bit for more details and consistency

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

10 years agoRefactor the unit test for MemoryBuffer::getOpenFileSlice
Eli Bendersky [Tue, 23 Jul 2013 20:58:51 +0000 (20:58 +0000)]
Refactor the unit test for MemoryBuffer::getOpenFileSlice

Run in two different modes: with and without reopening the temporary file
between creating it and mapping it with MemoryBuffer.

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

10 years agoDebug Info: code cleanup, use getNodeField if possible.
Manman Ren [Tue, 23 Jul 2013 20:39:32 +0000 (20:39 +0000)]
Debug Info: code cleanup, use getNodeField if possible.

Use getNodeField to access a field as a MDNode.
No functionality change.

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

10 years agoSplit getOpenFile into getOpenFile and getOpenFileSlice.
Rafael Espindola [Tue, 23 Jul 2013 20:25:01 +0000 (20:25 +0000)]
Split getOpenFile into getOpenFile and getOpenFileSlice.

The main observation is that we never need both the filesize and the map size.
When mapping a slice of a file, it doesn't make sense to request a null
terminator and that would be the only case where the filesize would be used.

There are other cleanups that should be done in this area:

* A client should not have to pass the size (even an explicit -1) to say if
  it wants a null terminator or not, so we should probably swap the argument
  order.
* The default should be to not require a null terminator. Very few clients
  require this, but many end up asking for it just because it is the default.

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

10 years agoFix use of the getOpenFile api.
Rafael Espindola [Tue, 23 Jul 2013 18:44:31 +0000 (18:44 +0000)]
Fix use of the getOpenFile api.

The gold plugin was passing the desired map size as the file size. This was
working for two reasons:
* Recent version of gold provide the get_view callback, so this code was not
  used.
* In older versions, getOpenFile was called, but the file size is never used
  if we don't require null terminated buffers and map size defaults to the
  file size.

Thanks to Eli Bendersky for noticing this.

I will try to make this api a bit less error prone.

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

10 years agoDebugInfo Verifier: verify the actual type.
Manman Ren [Tue, 23 Jul 2013 18:14:25 +0000 (18:14 +0000)]
DebugInfo Verifier: verify the actual type.

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

10 years agoRevert "Remove use of asymmetric std::lower_bound comparator."
Ahmed Bougacha [Tue, 23 Jul 2013 17:44:11 +0000 (17:44 +0000)]
Revert "Remove use of asymmetric std::lower_bound comparator."

This reverts commit r185676.
Originally done because of VS 2008.

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

10 years agodocs: Update old VS 2008 references.
Ahmed Bougacha [Tue, 23 Jul 2013 17:44:01 +0000 (17:44 +0000)]
docs: Update old VS 2008 references.

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

10 years agodocs: cleanup VS 2008 release note.
Ahmed Bougacha [Tue, 23 Jul 2013 17:32:57 +0000 (17:32 +0000)]
docs: cleanup VS 2008 release note.

Remove trailing ')'.  Sorry about all that, should be good now!

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

10 years agodocs: Correct reST link.
Ahmed Bougacha [Tue, 23 Jul 2013 17:28:35 +0000 (17:28 +0000)]
docs: Correct reST link.

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

10 years agoUpdate docs to drop support for VS 2008.
Ahmed Bougacha [Tue, 23 Jul 2013 17:25:26 +0000 (17:25 +0000)]
Update docs to drop support for VS 2008.

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

10 years agoAdd not so that these tests pass with pipefail enabled.
Rafael Espindola [Tue, 23 Jul 2013 13:18:20 +0000 (13:18 +0000)]
Add not so that these tests pass with pipefail enabled.

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

10 years agoAdd -disable-debug-info-verifier.
Rafael Espindola [Tue, 23 Jul 2013 12:31:37 +0000 (12:31 +0000)]
Add -disable-debug-info-verifier.

Found while testing with pipefail enabled.

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

10 years agoFix the build in c++03 mode.
Rafael Espindola [Tue, 23 Jul 2013 11:02:16 +0000 (11:02 +0000)]
Fix the build in c++03 mode.

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

10 years agoAdd an initial implementation of archive symbol table generation.
Rafael Espindola [Tue, 23 Jul 2013 10:47:01 +0000 (10:47 +0000)]
Add an initial implementation of archive symbol table generation.

The symbol table has forward references in the file. Instead of allocating
a temporary buffer or counting the size and then writing, this implementation
writes a dummy value first and patches it once the final value is known.

There is room for performance improvement. I will implement them as soon as I
get some other features (like a ranlib mode) in.

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

10 years agoRemove some errant space charcters in mnemonic strings.
Craig Topper [Tue, 23 Jul 2013 06:45:34 +0000 (06:45 +0000)]
Remove some errant space charcters in mnemonic strings.

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

10 years agoremove unnecessary space
Shuxin Yang [Tue, 23 Jul 2013 06:44:34 +0000 (06:44 +0000)]
remove unnecessary space

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

10 years agollvm/test/DebugInfo/X86/dbg-value-range.ll: Add -disable-debug-info-verifier, too...
NAKAMURA Takumi [Tue, 23 Jul 2013 06:41:51 +0000 (06:41 +0000)]
llvm/test/DebugInfo/X86/dbg-value-range.ll: Add -disable-debug-info-verifier, too, since r186902.

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

10 years agoRemove 'else' after 'return'. No functional change.
Craig Topper [Tue, 23 Jul 2013 06:27:36 +0000 (06:27 +0000)]
Remove 'else' after 'return'. No functional change.

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

10 years agoRemove trailing whitespace.
Craig Topper [Tue, 23 Jul 2013 06:25:00 +0000 (06:25 +0000)]
Remove trailing whitespace.

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

10 years agoDon't let x86 asm printer use the no operand movsd alias. It should use the normal...
Craig Topper [Tue, 23 Jul 2013 01:50:47 +0000 (01:50 +0000)]
Don't let x86 asm printer use the no operand movsd alias. It should use the normal movsl instead.

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

10 years agoR600: Add support for 24-bit MAD instructions
Tom Stellard [Tue, 23 Jul 2013 01:48:49 +0000 (01:48 +0000)]
R600: Add support for 24-bit MAD instructions

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186923 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add support for 24-bit MUL instructions
Tom Stellard [Tue, 23 Jul 2013 01:48:42 +0000 (01:48 +0000)]
R600: Add support for 24-bit MUL instructions

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186922 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Improve support for < 32-bit loads
Tom Stellard [Tue, 23 Jul 2013 01:48:35 +0000 (01:48 +0000)]
R600: Improve support for < 32-bit loads

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186921 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Rename AMDILISelDAGToDAG.cpp -> AMDGPUISelDAGToDAG.cpp
Tom Stellard [Tue, 23 Jul 2013 01:48:29 +0000 (01:48 +0000)]
R600: Rename AMDILISelDAGToDAG.cpp -> AMDGPUISelDAGToDAG.cpp

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186920 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Move CONST_ADDRESS folding into AMDGPUDAGToDAGISel::Select()
Tom Stellard [Tue, 23 Jul 2013 01:48:24 +0000 (01:48 +0000)]
R600: Move CONST_ADDRESS folding into AMDGPUDAGToDAGISel::Select()

This increases the number of opportunites we have for folding.  With the
previous implementation we were unable to fold into any instructions
other than the first when multiple instructions were selected from a
single SDNode.

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186919 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Use KCache for kernel arguments
Tom Stellard [Tue, 23 Jul 2013 01:48:18 +0000 (01:48 +0000)]
R600: Use KCache for kernel arguments

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186918 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Simplify assembly for KCache registers using the TableGen !add operator
Tom Stellard [Tue, 23 Jul 2013 01:48:08 +0000 (01:48 +0000)]
R600: Simplify assembly for KCache registers using the TableGen !add operator

Before:

MOV * T0.W, KC0[131-128].Y

After:

MOV * T0.W, KC0[3].Y

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186917 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Use the same compute kernel calling convention for all GPUs
Tom Stellard [Tue, 23 Jul 2013 01:48:05 +0000 (01:48 +0000)]
R600: Use the same compute kernel calling convention for all GPUs

A side-effect of this is that now the compiler expects kernel arguments
to be 4-byte aligned.

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186916 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Use correct LoadExtType when lowering kernel arguments
Tom Stellard [Tue, 23 Jul 2013 01:47:58 +0000 (01:47 +0000)]
R600: Use correct LoadExtType when lowering kernel arguments

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186915 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Clean up extended load patterns
Tom Stellard [Tue, 23 Jul 2013 01:47:52 +0000 (01:47 +0000)]
R600: Clean up extended load patterns

Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186914 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Expand vector FNEG
Tom Stellard [Tue, 23 Jul 2013 01:47:46 +0000 (01:47 +0000)]
R600: Expand vector FNEG

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

10 years agoRevert r186907 to fix bots.
Craig Topper [Tue, 23 Jul 2013 01:29:37 +0000 (01:29 +0000)]
Revert r186907 to fix bots.

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

10 years agoDon't let x86 asm printer use the no operand movsd alias. It should use the normal...
Craig Topper [Tue, 23 Jul 2013 01:21:36 +0000 (01:21 +0000)]
Don't let x86 asm printer use the no operand movsd alias. It should use the normal movsl instead.

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

10 years agoAdd aliases to map 'imm, mem' form of x86 bts/btr/btc without a size suffix to their...
Craig Topper [Tue, 23 Jul 2013 00:56:15 +0000 (00:56 +0000)]
Add aliases to map 'imm, mem' form of x86 bts/btr/btc without a size suffix to their 32-bit forms.

This makes them consistent with 'bt' which already had this handling. gas has the same behavior. There have been discussions on the mailing list about determining size based on the immediate, but my goal here was just to remove the inconsistency.

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

10 years agoDebug Info Finder: use processDeclare and processValue to list debug info
Manman Ren [Tue, 23 Jul 2013 00:22:51 +0000 (00:22 +0000)]
Debug Info Finder: use processDeclare and processValue to list debug info
MDNodes used by DbgDeclareInst and DbgValueInst.

Another 16 testing cases failed and they are disabled with
-disable-debug-info-verifier.
A total of 34 cases are disabled with -disable-debug-info-verifier and will be
corrected.

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

10 years agoExplicitly don't let the asm printer use the clrb/w/l aliases for xor %reg, %reg.
Craig Topper [Tue, 23 Jul 2013 00:15:19 +0000 (00:15 +0000)]
Explicitly don't let the asm printer use the clrb/w/l aliases for xor %reg, %reg.

It only didn't use it before because it seems InstAlias handling in the asm printer fails to count tied operands so it tried to find an xor with 2 operands instead of the 3 it wfails to count tied.

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

10 years agoSuppress argumentless aliases for some x86 FP operations from being used by the asm...
Craig Topper [Tue, 23 Jul 2013 00:03:33 +0000 (00:03 +0000)]
Suppress argumentless aliases for some x86 FP operations from being used by the asm writer. Prefer to use the explicit %st(1) form.

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