oota-llvm.git
11 years agoThis patch adds the X86FixupLEAs pass, which will reduce instruction
Preston Gurd [Thu, 25 Apr 2013 20:29:37 +0000 (20:29 +0000)]
This patch adds the X86FixupLEAs pass, which will reduce instruction
latency for certain models of the Intel Atom family, by converting
instructions into their equivalent LEA instructions, when it is both
useful and possible to do so.

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

11 years agoLoopVectorizer: No need to generate pointer disambiguation checks between readonly...
Nadav Rotem [Thu, 25 Apr 2013 19:55:03 +0000 (19:55 +0000)]
LoopVectorizer: No need to generate pointer disambiguation checks between readonly pointers.

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

11 years ago[mc-coff] Forward Linker Option flags into the .drectve section
Reid Kleckner [Thu, 25 Apr 2013 19:34:41 +0000 (19:34 +0000)]
[mc-coff] Forward Linker Option flags into the .drectve section

Summary:
This is modelled on the Mach-O linker options implementation and should
support a Clang implementation of #pragma comment(lib/linker).

Reviewers: rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D724

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

11 years agoFix section relocation for SECTIONREL32 with immediate offset.
Rafael Espindola [Thu, 25 Apr 2013 19:27:05 +0000 (19:27 +0000)]
Fix section relocation for SECTIONREL32 with immediate offset.

Patch by Kai Nacke. This matches the gnu as output.

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

11 years agoRemove tailing whitespaces
Michael Liao [Thu, 25 Apr 2013 18:54:02 +0000 (18:54 +0000)]
Remove tailing whitespaces

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

11 years ago[inline asm] Add a test case for r180226. The specific issue is that the inline
Chad Rosier [Thu, 25 Apr 2013 17:10:21 +0000 (17:10 +0000)]
[inline asm] Add a test case for r180226.  The specific issue is that the inline
assembly is requesting a 64-bit register, which is invalid for i386.
rdar://13731657

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

11 years agoUse a pointer as the relocation iterator.
Rafael Espindola [Thu, 25 Apr 2013 12:45:46 +0000 (12:45 +0000)]
Use a pointer as the relocation iterator.

Since the relocation iterator walks only the relocations in one section, we
can just use a pointer and avoid fetching information about the section at
every reference.

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

11 years agoClarify getRelocationAddress x getRelocationOffset a bit.
Rafael Espindola [Thu, 25 Apr 2013 12:28:45 +0000 (12:28 +0000)]
Clarify getRelocationAddress x getRelocationOffset a bit.

getRelocationAddress is for dynamic libraries and executables,
getRelocationOffset for relocatable objects.

Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a
test of ELF's. llvm-readobj -r now prints the same values as readelf -r.

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

11 years agoFix constant folding for one lane vector types. Constant folding one lane vector...
Silviu Baranga [Thu, 25 Apr 2013 09:32:33 +0000 (09:32 +0000)]
Fix constant folding for one lane vector types. Constant folding one lane vector types not returns a vector instead of a scalar.

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

11 years agoRevert "Adding object caching support to MCJIT"
Rafael Espindola [Thu, 25 Apr 2013 03:47:41 +0000 (03:47 +0000)]
Revert "Adding object caching support to MCJIT"

This reverts commit 07f03923137a91e3cca5d7fc075a22f8c9baf33a.

Looks like it broke the valgrind bot:

http://lab.llvm.org:8011/builders/llvm-x86_64-linux-vg_leak/builds/649

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

11 years agoRevert "Exposing MCJIT through C API"
Rafael Espindola [Thu, 25 Apr 2013 03:19:12 +0000 (03:19 +0000)]
Revert "Exposing MCJIT through C API"

This reverts commit 8c31b298149ca3c3f2bbd9e8aa9a01c4d91f3d74.

It looks like this commit broke some bots:

http://lab.llvm.org:8011/builders/llvm-ppc64-linux2/builds/5209

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

11 years agoDon't compute a std::vector<uint8_t> just to write it out a stream.
Rafael Espindola [Thu, 25 Apr 2013 03:07:42 +0000 (03:07 +0000)]
Don't compute a std::vector<uint8_t> just to write it out a stream.

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

11 years agoTest case for r180241.
Akira Hatanaka [Thu, 25 Apr 2013 02:22:07 +0000 (02:22 +0000)]
Test case for r180241.

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

11 years agoTest case for r180238.
Akira Hatanaka [Thu, 25 Apr 2013 02:21:09 +0000 (02:21 +0000)]
Test case for r180238.

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

11 years ago[mips] Add definitions of micromips load and store instructions.
Akira Hatanaka [Thu, 25 Apr 2013 01:21:25 +0000 (01:21 +0000)]
[mips] Add definitions of micromips load and store instructions.

Patch by Zoran Jovanovic.

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

11 years agoAllow users to choose identity used to sign tools.
Filipe Cabecinhas [Thu, 25 Apr 2013 01:17:54 +0000 (01:17 +0000)]
Allow users to choose identity used to sign tools.

Summary:
No change if the identity isn't defined by the makefile.

Reviewers: echristo

Differential Revision: http://llvm-reviews.chandlerc.com/D632

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

11 years ago[mips] Add definitions of micromips shift instructions.
Akira Hatanaka [Thu, 25 Apr 2013 01:11:15 +0000 (01:11 +0000)]
[mips] Add definitions of micromips shift instructions.

Patch by Zoran Jovanovic.

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

11 years agoFixing OCAML bindings for MCJIT
Andrew Kaylor [Thu, 25 Apr 2013 00:03:58 +0000 (00:03 +0000)]
Fixing OCAML bindings for MCJIT

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

11 years agoR600: Initialize BooleanVectorContents
Tom Stellard [Wed, 24 Apr 2013 23:56:18 +0000 (23:56 +0000)]
R600: Initialize BooleanVectorContents

Fixes test/CodeGen/R600/setcc.ll

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

11 years agoR600: Use SHT_PROGBITS for the .AMDGPU.config section
Tom Stellard [Wed, 24 Apr 2013 23:56:14 +0000 (23:56 +0000)]
R600: Use SHT_PROGBITS for the .AMDGPU.config section

The libelf implementation that is distributed here:
http://www.mr511.de/software/english.html
will not parse sections that are marked SHT_NULL.

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

11 years agoExposing MCJIT through C API
Andrew Kaylor [Wed, 24 Apr 2013 23:33:53 +0000 (23:33 +0000)]
Exposing MCJIT through C API

Patch by Filip Pizlo

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

11 years agoFix for r180193 - MI Sched: eliminate local vreg.
Andrew Trick [Wed, 24 Apr 2013 23:19:56 +0000 (23:19 +0000)]
Fix for r180193 - MI Sched: eliminate local vreg.

Fixes PR15838. Need to check for blocks with nothing but dbg.value.

I'm not sure how to force this situation with a unit test. I tried to
reduce the test case in PR15838 (1k lines of metadata) but gave up.

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

11 years ago[inline asm] Fix a crasher for an invalid value type/register class.
Chad Rosier [Wed, 24 Apr 2013 22:53:10 +0000 (22:53 +0000)]
[inline asm] Fix a crasher for an invalid value type/register class.
rdar://13731657

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

11 years agoMaking invalidateInstructionCache automatic in SectionMemoryManager
Andrew Kaylor [Wed, 24 Apr 2013 22:39:12 +0000 (22:39 +0000)]
Making invalidateInstructionCache automatic in SectionMemoryManager

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

11 years ago[objc-arc] Added ImpreciseAutoreleaseSet to track autorelease calls that were once...
Michael Gottesman [Wed, 24 Apr 2013 22:18:18 +0000 (22:18 +0000)]
[objc-arc] Added ImpreciseAutoreleaseSet to track autorelease calls that were once autoreleaseRV instructions.

Due to the semantics of ARC, we must be extremely conservative with autorelease
calls inserted by the frontend since ARC gaurantees that said object will be in
the autorelease pool after that point, an optimization invariant that the
optimizer must respect.

On the other hand, we are allowed significantly more flexibility with
autoreleaseRV instructions.

Often times though this flexibility is disrupted by early transformations which
transform objc_autoreleaseRV => objc_autorelease if said instruction is no
longer being used as part of an RV pair (generally due to inlining). Since we
can not tell the difference in between an autorelease put into place by the
frontend and one created through said ``strength reduction'' we can not perform
these optimizations.

The addition of this set gets around said issues by allowing us to differentiate
in between said two cases.

rdar://problem/13697741.

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

11 years agoFixed comment typo.
Michael Gottesman [Wed, 24 Apr 2013 22:18:15 +0000 (22:18 +0000)]
Fixed comment typo.

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

11 years agoMips assembler: Add 64 bit testing for JAL
Jack Carter [Wed, 24 Apr 2013 21:52:42 +0000 (21:52 +0000)]
Mips assembler: Add 64 bit testing for JAL

Contributer: Vladimir Medic

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

11 years agoUse pointers to iterate over symbols.
Rafael Espindola [Wed, 24 Apr 2013 19:47:55 +0000 (19:47 +0000)]
Use pointers to iterate over symbols.

While here, don't report a dummy symbol for relocations that don't have symbols.
We used to says such relocations were for the first defined symbol, but now we
return end_symbols(). The llvm-readobj output change agrees with otool.

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

11 years agoDon't produce an empty llvm.compiler.used in LTO.
Rafael Espindola [Wed, 24 Apr 2013 17:54:35 +0000 (17:54 +0000)]
Don't produce an empty llvm.compiler.used in LTO.

LTO was always creating an empty llvm.compiler.used. With this patch we
now first check if there is anything to be added first.

Unfortunately, there is no good way to test libLTO in isolation as it needs gold
or ld64, but there are bots doing LTO builds that found this problem.

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

11 years agoDon't forward declare environ on Windows
Reid Kleckner [Wed, 24 Apr 2013 17:50:30 +0000 (17:50 +0000)]
Don't forward declare environ on Windows

That seems to interact poorly with the environ and _environ macros
defined in MSVC's <stdlib.h>.

Also remove the incorrect comment about _NSGetEnviron().

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

11 years agoLoopVectorizer: Change variable name Stride to ConsecutiveStride
Arnold Schwaighofer [Wed, 24 Apr 2013 16:16:03 +0000 (16:16 +0000)]
LoopVectorizer: Change variable name Stride to ConsecutiveStride

This makes it easier to read the code.

No functionality change.

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

11 years agoLoopVectorize: Scalarize padded types
Arnold Schwaighofer [Wed, 24 Apr 2013 16:16:01 +0000 (16:16 +0000)]
LoopVectorize: Scalarize padded types

This patch disables memory-instruction vectorization for types that need padding
bytes, e.g., x86_fp80 has 10 bytes store size with 6 bytes padding in darwin on
x86_64. Because the load/store vectorization is performed by the bit casting to
a packed vector, which has incompatible memory layout due to the lack of padding
bytes, the present vectorizer produces inconsistent result for memory
instructions of those types.
This patch checks an equality of the AllocSize of a scalar type and allocated
size for each vector element, to ensure that there is no padding bytes and the
array can be read/written using vector operations.

Patch by Daisuke Takahashi!

Fixes PR15758.

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

11 years agoLoopVectorizer: Bail out if we don't have datalayout we need it
Arnold Schwaighofer [Wed, 24 Apr 2013 16:15:58 +0000 (16:15 +0000)]
LoopVectorizer: Bail out if we don't have datalayout we need it

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

11 years agoRevert r180189.
Rafael Espindola [Wed, 24 Apr 2013 16:10:49 +0000 (16:10 +0000)]
Revert r180189.

This should bring the ppc bots back. I will try to write a test that would
have found the problem on a little endian system too.

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

11 years agoMI Sched: eliminate local vreg copies.
Andrew Trick [Wed, 24 Apr 2013 15:54:43 +0000 (15:54 +0000)]
MI Sched: eliminate local vreg copies.

For now, we just reschedule instructions that use the copied vregs and
let regalloc elliminate it. I would really like to eliminate the
copies on-the-fly during scheduling, but we need a complete
implementation of repairIntervalsInRange() first.

The general strategy is for the register coalescer to eliminate as
many global copies as possible and shrink live ranges to be
extended-basic-block local. The coalescer should not have to worry
about resolving local copies (e.g. it shouldn't attemp to reorder
instructions). The scheduler is a much better place to deal with local
interference. The coalescer side of this equation needs work.

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

11 years agoRegister Coalescing: add a flag to disable rescheduling.
Andrew Trick [Wed, 24 Apr 2013 15:54:39 +0000 (15:54 +0000)]
Register Coalescing: add a flag to disable rescheduling.

When MachineScheduler is enabled, this functionality can be
removed. Until then, provide a way to disable it for test cases and
designing MachineScheduler heuristics.

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

11 years agoMI Sched: regpressure tracing.
Andrew Trick [Wed, 24 Apr 2013 15:54:36 +0000 (15:54 +0000)]
MI Sched: regpressure tracing.

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

11 years agoFormatting fixes.
Rafael Espindola [Wed, 24 Apr 2013 15:14:22 +0000 (15:14 +0000)]
Formatting fixes.

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

11 years agoUse a pointer as the relocation iterator.
Rafael Espindola [Wed, 24 Apr 2013 15:02:03 +0000 (15:02 +0000)]
Use a pointer as the relocation iterator.

Since the relocation iterator walks only the relocations in one section, we
can just use a pointer and avoid fetching information about the section at
every reference.

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

11 years agoAdd include guards.
Eric Christopher [Wed, 24 Apr 2013 14:49:26 +0000 (14:49 +0000)]
Add include guards.

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

11 years agoFormatting.
Eric Christopher [Wed, 24 Apr 2013 12:56:18 +0000 (12:56 +0000)]
Formatting.

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

11 years agoAlign the __LD,__compact_unwind section.
Bill Wendling [Wed, 24 Apr 2013 03:11:14 +0000 (03:11 +0000)]
Align the __LD,__compact_unwind section.

I know what would be cool! We should align the compact unwind section because
aligned data access is faster.
<rdar://problem/13723271>

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

11 years agoremove cbe backend from sample configure
Jia Liu [Wed, 24 Apr 2013 02:17:19 +0000 (02:17 +0000)]
remove cbe backend from sample configure

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

11 years agoCleanup testcase and ensure we actually exercise the inliner.
Adrian Prantl [Wed, 24 Apr 2013 01:44:15 +0000 (01:44 +0000)]
Cleanup testcase and ensure we actually exercise the inliner.
rdar://problem/12415623

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

11 years agoMachine model: Generate table entries for super-resources.
Andrew Trick [Tue, 23 Apr 2013 23:45:16 +0000 (23:45 +0000)]
Machine model: Generate table entries for super-resources.

Super-resources and resource groups are two ways of expressing
overlapping sets of processor resources. Now we generate table entries
the same way for both so the scheduler never needs to explicitly check
for super-resources.

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

11 years agoMachine model: verify well-formed processor resource groups.
Andrew Trick [Tue, 23 Apr 2013 23:45:14 +0000 (23:45 +0000)]
Machine model: verify well-formed processor resource groups.

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

11 years agoMachine model: rewrite a tablegen loop to avoid comparing record pointers.
Andrew Trick [Tue, 23 Apr 2013 23:45:11 +0000 (23:45 +0000)]
Machine model: rewrite a tablegen loop to avoid comparing record pointers.

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

11 years agoComment a strange field in ScheduleDAG.
Andrew Trick [Tue, 23 Apr 2013 23:45:08 +0000 (23:45 +0000)]
Comment a strange field in ScheduleDAG.

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

11 years agoFix dependency layering issues caused by r180112.
Eric Christopher [Tue, 23 Apr 2013 22:53:53 +0000 (22:53 +0000)]
Fix dependency layering issues caused by r180112.

Patch by Tom Stellard. (Committed while he's afk per request)

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

11 years agoFixing cmake build for MCJIT unit tests
Andrew Kaylor [Tue, 23 Apr 2013 21:46:56 +0000 (21:46 +0000)]
Fixing cmake build for MCJIT unit tests

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

11 years agoFixing typo in comment.
Andrew Kaylor [Tue, 23 Apr 2013 21:32:32 +0000 (21:32 +0000)]
Fixing typo in comment.

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

11 years agoAdding object caching support to MCJIT
Andrew Kaylor [Tue, 23 Apr 2013 21:26:38 +0000 (21:26 +0000)]
Adding object caching support to MCJIT

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

11 years agoHexagon: Use multiclass for combine and STri[bhwd]_shl_V4 instructions.
Jyotsna Verma [Tue, 23 Apr 2013 21:17:40 +0000 (21:17 +0000)]
Hexagon: Use multiclass for combine and STri[bhwd]_shl_V4 instructions.

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

11 years agoHexagon: Define relations for GP-relative instructions.
Jyotsna Verma [Tue, 23 Apr 2013 21:05:55 +0000 (21:05 +0000)]
Hexagon: Define relations for GP-relative instructions.

No functionality change.

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

11 years agoMake sure the instruction right after an inlined function has a
Adrian Prantl [Tue, 23 Apr 2013 19:56:03 +0000 (19:56 +0000)]
Make sure the instruction right after an inlined function has a
debug location. This solves a problem where range of an inlined
subroutine is emitted wrongly.
Patch by Manman Ren.

Fixes rdar://problem/12415623

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

11 years agoAdd more tests for r179925 to verify correct handling of signext/zeroext; strengthen...
Stephen Lin [Tue, 23 Apr 2013 19:42:25 +0000 (19:42 +0000)]
Add more tests for r179925 to verify correct handling of signext/zeroext; strengthen condition check to require actual MVT::i32 virtual register types, just in case (no actual functionality change)

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

11 years agoFix typo.
Rafael Espindola [Tue, 23 Apr 2013 19:39:34 +0000 (19:39 +0000)]
Fix typo.

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

11 years agoLowercase "is" boolean variable prefix for consistency within function, no functional...
Stephen Lin [Tue, 23 Apr 2013 19:30:12 +0000 (19:30 +0000)]
Lowercase "is" boolean variable prefix for consistency within function, no functionality change.

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

11 years agoSimplify yaml2obj a bit.
Rafael Espindola [Tue, 23 Apr 2013 19:26:43 +0000 (19:26 +0000)]
Simplify yaml2obj a bit.

The COFFParser now contains only a COFFYAML::Object and the string table
(which is recomputed, not serialized).

The structs in COFFParser now all begin with a Header field with what is
actually on the COFF object. The other fields are things that are semantically
part of the struct (relocations in a section for exmaple), but are not actually
represented that way in the object file.

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

11 years agoHexagon: Remove assembler mapped instruction definitions.
Jyotsna Verma [Tue, 23 Apr 2013 19:15:55 +0000 (19:15 +0000)]
Hexagon: Remove assembler mapped instruction definitions.

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

11 years agoChange commentary for PowerPC Boolean vector contents.
Bill Schmidt [Tue, 23 Apr 2013 18:49:44 +0000 (18:49 +0000)]
Change commentary for PowerPC Boolean vector contents.

No functional change intended.

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

11 years ago[mips] Compare splat value with element size instead of calling isUIntN.
Akira Hatanaka [Tue, 23 Apr 2013 18:09:42 +0000 (18:09 +0000)]
[mips] Compare splat value with element size instead of calling isUIntN.

No intended changes in functionality.

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

11 years agoDAGCombine should not aggressively fold SEXT(VSETCC(...)) into a wider VSETCC without...
Owen Anderson [Tue, 23 Apr 2013 18:09:28 +0000 (18:09 +0000)]
DAGCombine should not aggressively fold SEXT(VSETCC(...)) into a wider VSETCC without first checking the target's vector boolean contents.
This exposed an issue with PowerPC AltiVec where it appears it was setting the wrong vector boolean contents.  The included change
fixes the PowerPC tests, and was OK'd by Hal.

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

11 years agoTesting for _XCR_XFEATURE_ENABLED_MASK instead of a specific MSVC version because...
Aaron Ballman [Tue, 23 Apr 2013 17:38:44 +0000 (17:38 +0000)]
Testing for _XCR_XFEATURE_ENABLED_MASK instead of a specific MSVC version because some MSVC 2010 SP1 installations do not have the _xgetbv intrinsic.  Patch thanks to Serge Pavlov!

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

11 years agoR600: Use .AMDGPU.config section to emit stacksize
Vincent Lejeune [Tue, 23 Apr 2013 17:34:12 +0000 (17:34 +0000)]
R600: Use .AMDGPU.config section to emit stacksize

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

11 years agoR600: Add CF_END
Vincent Lejeune [Tue, 23 Apr 2013 17:34:00 +0000 (17:34 +0000)]
R600: Add CF_END

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

11 years agoLoopVectorizer: Fix 15830. When scalarizing and unrolling stores make sure that the...
Nadav Rotem [Tue, 23 Apr 2013 17:12:42 +0000 (17:12 +0000)]
LoopVectorizer: Fix 15830. When scalarizing and unrolling stores make sure that the order in which the elements are scalarized is the same as the original order.
This fixes a miscompilation in FreeBSD's regex library.

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

11 years agoHexagon: Remove duplicate instructions to handle global/immediate values
Jyotsna Verma [Tue, 23 Apr 2013 17:11:46 +0000 (17:11 +0000)]
Hexagon: Remove duplicate instructions to handle global/immediate values
for absolute/absolute-set addressing modes.

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

11 years agoCall the potentially costly isAnnotatedParallel() only once.
Pekka Jaaskelainen [Tue, 23 Apr 2013 16:44:43 +0000 (16:44 +0000)]
Call the potentially costly isAnnotatedParallel() only once.
Made the uniform write test's checks a bit stricter.

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

11 years agoAdd some constraints to use of 'returned':
Stephen Lin [Tue, 23 Apr 2013 16:31:56 +0000 (16:31 +0000)]
Add some constraints to use of 'returned':

1) Disallow 'returned' on parameter that is also 'sret' (no sensible semantics, as far as I can tell).
2) Conservatively disallow tail calls through 'returned' parameters that also are 'zext' or 'sext' (for consistency with treatment of other zero-extending and sign-extending operations in tail call position detection...can be revised later to handle situations that can be determined to be safe).

This is a new attribute that is not yet used, so there is no impact.

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

11 years agoWrite relocations in yaml2obj.
Rafael Espindola [Tue, 23 Apr 2013 15:53:02 +0000 (15:53 +0000)]
Write relocations in yaml2obj.

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

11 years agoWrap.h: Define wrap / unwrap function for ExecutionEngine
Tom Stellard [Tue, 23 Apr 2013 15:13:36 +0000 (15:13 +0000)]
Wrap.h: Define wrap / unwrap function for ExecutionEngine

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

11 years agoc vs c++ mistake in header file typedef for AtomicRMW fix in rev 180100.
Carlo Kok [Tue, 23 Apr 2013 13:45:37 +0000 (13:45 +0000)]
c vs c++ mistake in header file typedef for AtomicRMW fix in rev 180100.

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

11 years agoFixup for r180094: properly use MSan interface functions
Alexey Samsonov [Tue, 23 Apr 2013 13:35:32 +0000 (13:35 +0000)]
Fixup for r180094: properly use MSan interface functions

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

11 years agoExpose IRBuilder::CreateAtomicRMW as LLVMBuildAtomicRMW in llvm-c.
Carlo Kok [Tue, 23 Apr 2013 13:21:19 +0000 (13:21 +0000)]
Expose IRBuilder::CreateAtomicRMW as LLVMBuildAtomicRMW in llvm-c.

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

11 years agoUn-revert the environ copy in ProgramTest after fixing it on OS X
Reid Kleckner [Tue, 23 Apr 2013 13:15:51 +0000 (13:15 +0000)]
Un-revert the environ copy in ProgramTest after fixing it on OS X

This was r180041 and r180046, which was reverted in r180066.
Re-committing this should fix the dragonegg bootstrap, which I presume
needs LD_LIBRARY_PATH to be propagated to the child.

Tested on Linux, Windows, and Mac OS 10.6.

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

11 years agoTell MSan that memory initialized by libz is valid
Alexey Samsonov [Tue, 23 Apr 2013 12:17:46 +0000 (12:17 +0000)]
Tell MSan that memory initialized by libz is valid

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

11 years agoMove test from grep to FileCheck.
Rafael Espindola [Tue, 23 Apr 2013 12:03:27 +0000 (12:03 +0000)]
Move test from grep to FileCheck.

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

11 years agoUse zlib to uncompress debug sections in DWARF parser.
Alexey Samsonov [Tue, 23 Apr 2013 10:17:34 +0000 (10:17 +0000)]
Use zlib to uncompress debug sections in DWARF parser.

This makes llvm-dwarfdump and llvm-symbolizer understand
debug info sections compressed by ld.gold linker.

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

11 years agoAdd llvm_unreachable after fully covered switch to pacify GCC
Hans Wennborg [Tue, 23 Apr 2013 10:12:16 +0000 (10:12 +0000)]
Add llvm_unreachable after fully covered switch to pacify GCC

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

11 years agoAdd more guards around zlib-dependent code
Alexey Samsonov [Tue, 23 Apr 2013 08:57:30 +0000 (08:57 +0000)]
Add more guards around zlib-dependent code

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

11 years agoAdd basic zlib support to LLVM. This would allow to use compression/uncompression...
Alexey Samsonov [Tue, 23 Apr 2013 08:28:39 +0000 (08:28 +0000)]
Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools.

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

11 years agoRefuse to (even try to) vectorize loops which have uniform writes,
Pekka Jaaskelainen [Tue, 23 Apr 2013 08:08:51 +0000 (08:08 +0000)]
Refuse to (even try to) vectorize loops which have uniform writes,
even if erroneously annotated with the parallel loop metadata.

Fixes Bug 15794:
"Loop Vectorizer: Crashes with the use of llvm.loop.parallel metadata"

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

11 years agoAArch64: remove unnecessary check that RS is valid
Tim Northover [Tue, 23 Apr 2013 06:55:15 +0000 (06:55 +0000)]
AArch64: remove unnecessary check that RS is valid

AArch64 always demands a register-scavenger, so the pointer should never be
NULL. However, in the spirit of paranoia, we'll assert it before use just in
case.

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

11 years agoStruct-path aware TBAA: update getMostGenericTBAA
Manman Ren [Mon, 22 Apr 2013 23:00:44 +0000 (23:00 +0000)]
Struct-path aware TBAA: update getMostGenericTBAA

The tag is of type TBAANode when flag EnableStructPathTBAA is off.

Move implementation of MDNode::getMostGenericTBAA to TypeBasedAliasAnalysis.cpp
since it depends on how to interprete the MDNodes for scalar TBAA and
struct-path aware TBAA.

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

11 years agoRevert "Add a missing reference on a std::vector<> out param"
Michael Gottesman [Mon, 22 Apr 2013 22:51:55 +0000 (22:51 +0000)]
Revert "Add a missing reference on a std::vector<> out param"
Revert "[Support] Propagate the environment into the test child process"

This reverts commit r180046.
This reverts commit r180041.

These have broken buildbots for ~3 hours:

http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/763

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

11 years agoRemove unused DwarfSectionOffsetDirective string
Matt Arsenault [Mon, 22 Apr 2013 22:49:11 +0000 (22:49 +0000)]
Remove unused DwarfSectionOffsetDirective string

The value isn't actually used, and setting it emits a COFF specific
directive.

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

11 years agoMove C++ code out of the C headers and into either C++ headers
Eric Christopher [Mon, 22 Apr 2013 22:47:22 +0000 (22:47 +0000)]
Move C++ code out of the C headers and into either C++ headers
or the C++ files themselves. This enables people to use
just a C compiler to interoperate with LLVM.

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

11 years ago[ms-inline asm] Removed this unnecessary check. In the current implementation,
Chad Rosier [Mon, 22 Apr 2013 22:38:35 +0000 (22:38 +0000)]
[ms-inline asm] Removed this unnecessary check.  In the current implementation,
Disp will always be one of MCSymbolRefExpr or MCConstantExpr, and never NULL.

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

11 years agoAdd test case for PR15779, which has previously been fixed.
Chad Rosier [Mon, 22 Apr 2013 22:30:01 +0000 (22:30 +0000)]
Add test case for PR15779, which has previously been fixed.

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

11 years ago[ms-inline asm] Get the OpDecl and remove a redundant lookup.
Chad Rosier [Mon, 22 Apr 2013 22:12:12 +0000 (22:12 +0000)]
[ms-inline asm] Get the OpDecl and remove a redundant lookup.
Part of rdar://13663589

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

11 years ago[ms-inline asm] Add the OpDecl to the InlineAsmIdentifierInfo struct and in turn
Chad Rosier [Mon, 22 Apr 2013 22:04:25 +0000 (22:04 +0000)]
[ms-inline asm] Add the OpDecl to the InlineAsmIdentifierInfo struct and in turn
the MCParsedAsmOperand.
Part of rdar://13663589

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

11 years agoOptimize MachineBasicBlock::getSymbol by caching the symbol. Since the symbol
Eli Bendersky [Mon, 22 Apr 2013 21:21:08 +0000 (21:21 +0000)]
Optimize MachineBasicBlock::getSymbol by caching the symbol. Since the symbol
name computation is expensive, this helps save about 25% of the time spent in
this function.

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

11 years agoAdd a missing reference on a std::vector<> out param
Reid Kleckner [Mon, 22 Apr 2013 20:58:09 +0000 (20:58 +0000)]
Add a missing reference on a std::vector<> out param

Pointed out by Eli.  The test passes for me either way, so I missed
this.

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

11 years agoChanged back (relative to commit 179786) the operations executed when extract(cast...
Anat Shemer [Mon, 22 Apr 2013 20:51:10 +0000 (20:51 +0000)]
Changed back (relative to commit 179786) the operations executed when extract(cast) is transformed to cast(extract). It uses the Builder class as before. In addition the result node is added to the Worklist, so all the previous extract users will become the new scalar cast users.

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

11 years agoFix unused variable warning.
Chad Rosier [Mon, 22 Apr 2013 20:42:32 +0000 (20:42 +0000)]
Fix unused variable warning.

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

11 years agoFix comment that didn't match the method it was above
Eli Bendersky [Mon, 22 Apr 2013 20:30:50 +0000 (20:30 +0000)]
Fix comment that didn't match the method it was above

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

11 years ago[Support] Propagate the environment into the test child process
Reid Kleckner [Mon, 22 Apr 2013 20:23:41 +0000 (20:23 +0000)]
[Support] Propagate the environment into the test child process

Should fix the dragonegg bootstrap builder, which reasonably needs
LD_LIBRARY_PATH to be set.

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

11 years ago80 columns.
Akira Hatanaka [Mon, 22 Apr 2013 20:13:37 +0000 (20:13 +0000)]
80 columns.

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

11 years ago[mips] In performDSPShiftCombine, check that all elements in the vector are
Akira Hatanaka [Mon, 22 Apr 2013 19:58:23 +0000 (19:58 +0000)]
[mips] In performDSPShiftCombine, check that all elements in the vector are
shifted by the same amount and the shift amount is smaller than the element
size.

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