oota-llvm.git
9 years agoAdd three other sections when L symbols are allowed.
Rafael Espindola [Thu, 6 Nov 2014 05:01:21 +0000 (05:01 +0000)]
Add three other sections when L symbols are allowed.

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

9 years agoAllow L symbols in no_dead_strip sections.
Rafael Espindola [Thu, 6 Nov 2014 02:42:03 +0000 (02:42 +0000)]
Allow L symbols in no_dead_strip sections.

If a section cannot be dead stripped, it is safe to use L symbols, since
the linker will keep all of it in the end.

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

9 years ago[X86] Lower VSELECT into SHRUNKBLEND when we shrink the bits used into the
Quentin Colombet [Thu, 6 Nov 2014 02:25:03 +0000 (02:25 +0000)]
[X86] Lower VSELECT into SHRUNKBLEND when we shrink the bits used into the
condition to match a blend.
This prevents optimizations that work on VSELECT to perform invalid
transformations. Indeed, the optimized condition does not match the vector
boolean content that is expected and bad things may happen.

This patch yields the exact same code on the whole test-suite + specs (-O3 and
-O3 -march=core-avx2), it improves one test case (vector-blend.ll) and fixes a
bug reduced in vselect-avx.ll.

<rdar://problem/18819506>

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

10 years agoRemove unnecessary .c_str() when implicitly converting to Twine
Matt Arsenault [Thu, 6 Nov 2014 01:13:27 +0000 (01:13 +0000)]
Remove unnecessary .c_str() when implicitly converting to Twine

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

10 years ago[Docs][JIT] Update the clang++ invocation lines in the kaleidoscope docs.
Lang Hames [Thu, 6 Nov 2014 00:31:04 +0000 (00:31 +0000)]
[Docs][JIT] Update the clang++ invocation lines in the kaleidoscope docs.

The old examples had missing/incorrect flags that were causing failures on newer
versions of clang and the tutorial code.

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

10 years ago[mips64] Fix MIPS64 exception personality encoding
Petar Jovanovic [Wed, 5 Nov 2014 22:42:31 +0000 (22:42 +0000)]
[mips64] Fix MIPS64 exception personality encoding

Remove dynamic relocations of __gxx_personality_v0 from the .eh_frame.
The MIPS64 follow-up of the MIPS32 fix (rL209907).

Patch by Vladimir Stefanovic.

Differential Revision: http://reviews.llvm.org/D6141

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

10 years ago[X86][SSE] Vector integer to float conversion memory folding
Simon Pilgrim [Wed, 5 Nov 2014 22:28:25 +0000 (22:28 +0000)]
[X86][SSE] Vector integer to float conversion memory folding

Added missing memory folding for the (V)CVTDQ2PS instructions - we can safely fold these (but not the (V)CVTDQ2PD versions which have a register/memory size discrepancy in the source operand). I've added a test case demonstrating that stack folding now works.

Differential Revision: http://reviews.llvm.org/D5981

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

10 years ago[docs] Document usage of Inputs/ for extra test files.
Sean Silva [Wed, 5 Nov 2014 22:17:18 +0000 (22:17 +0000)]
[docs] Document usage of Inputs/ for extra test files.

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

10 years ago[Linker] Add some test coverage for llvm.ident merging
Sean Silva [Wed, 5 Nov 2014 21:33:34 +0000 (21:33 +0000)]
[Linker] Add some test coverage for llvm.ident merging

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

10 years agoFix heap-use-after-free bug in expandSDiv when the operands are
Michael Ilseman [Wed, 5 Nov 2014 21:28:24 +0000 (21:28 +0000)]
Fix heap-use-after-free bug in expandSDiv when the operands are
constants, as discovered by ASAN.

Patch by Mehdi Amini!

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

10 years agoRemove obsolete ARM intrinsics vclz and vcnt
Steven Wu [Wed, 5 Nov 2014 21:02:55 +0000 (21:02 +0000)]
Remove obsolete ARM intrinsics vclz and vcnt

Both of the intrinsics get autoupgraded to target independent
intrinsics.

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

10 years agoAdd accessor to get 'visibility' part of st_other field
Simon Atanasyan [Wed, 5 Nov 2014 20:47:35 +0000 (20:47 +0000)]
Add accessor to get 'visibility' part of st_other field

This new `getVisibility()` function will also be used in the LLD code.

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

10 years agoFix test breakage from r221386
Derek Schuff [Wed, 5 Nov 2014 20:02:05 +0000 (20:02 +0000)]
Fix test breakage from r221386

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

10 years agoR600/SI: Fix omod display for VOP3b
Matt Arsenault [Wed, 5 Nov 2014 19:35:00 +0000 (19:35 +0000)]
R600/SI: Fix omod display for VOP3b

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

10 years ago[x86 fast-isel] Materialize allocas with the correct-sized lea for ILP32
Derek Schuff [Wed, 5 Nov 2014 19:27:21 +0000 (19:27 +0000)]
[x86 fast-isel] Materialize allocas with the correct-sized lea for ILP32

Summary:
X86FastISel::fastMaterializeAlloca was incorrectly conditioning its
opcode selection on subtarget bitness rather than pointer size.

Differential Revision: http://reviews.llvm.org/D6136

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

10 years agoR600/SI: Add testcase I forgot to commit from months ago
Matt Arsenault [Wed, 5 Nov 2014 19:01:22 +0000 (19:01 +0000)]
R600/SI: Add testcase I forgot to commit from months ago

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

10 years agoR600/SI: Move all rsrc building functions to SIISelLowering
Matt Arsenault [Wed, 5 Nov 2014 19:01:19 +0000 (19:01 +0000)]
R600/SI: Move all rsrc building functions to SIISelLowering

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

10 years agoR600/SI: Remove SI_ADDR64_RSRC
Matt Arsenault [Wed, 5 Nov 2014 19:01:17 +0000 (19:01 +0000)]
R600/SI: Remove SI_ADDR64_RSRC

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

10 years ago[NVPTX] Add NVPTXLowerStructArgs pass
Justin Holewinski [Wed, 5 Nov 2014 18:19:30 +0000 (18:19 +0000)]
[NVPTX] Add NVPTXLowerStructArgs pass

This works around the limitation that PTX does not allow .param space
loads/stores with arbitrary pointers.

If a function has a by-val struct ptr arg, say foo(%struct.x *byval %d), then
add the following instructions to the first basic block :

%temp = alloca %struct.x, align 8
%tt1 = bitcast %struct.x * %d to i8 *
%tt2 = llvm.nvvm.cvt.gen.to.param %tt2
%tempd = bitcast i8 addrspace(101) * to %struct.x addrspace(101) *
%tv = load %struct.x addrspace(101) * %tempd
store %struct.x %tv, %struct.x * %temp, align 8

The above code allocates some space in the stack and copies the incoming
struct from param space to local space. Then replace all occurences of %d
by %temp.

Fixes PR21465.

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

10 years agoIR: MDNode => Value: NamedMDNode::getOperator()
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 18:16:03 +0000 (18:16 +0000)]
IR: MDNode => Value: NamedMDNode::getOperator()

Change `NamedMDNode::getOperator()` from returning `MDNode *` to
returning `Value *`.  To reduce boilerplate at some call sites, add a
`getOperatorAsMDNode()` for named metadata that's expected to only
return `MDNode` -- for now, that's everything, but debug node named
metadata (such as llvm.dbg.cu and llvm.dbg.sp) will soon change.  This
is part of PR21433.

Note that there's a follow-up patch to clang for the API change.

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

10 years agoremove extra breaks; NFC
Sanjay Patel [Wed, 5 Nov 2014 18:00:07 +0000 (18:00 +0000)]
remove extra breaks; NFC

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

10 years agoIR: MDNode => Value: AsmWriter SlotTracker API
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 17:56:28 +0000 (17:56 +0000)]
IR: MDNode => Value: AsmWriter SlotTracker API

Change `SlotTracker::CreateMetadataSlot()` and
`SlotTracker::getMetadataSlot()` to use `Value` instead of `MDNode`.
Part of PR21433.

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

10 years ago[ARM] Remove more dead code.
Tilmann Scheller [Wed, 5 Nov 2014 17:45:04 +0000 (17:45 +0000)]
[ARM] Remove more dead code.

Dead code identified by the Clang static analyzer.

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

10 years agops][microMIPS] Implement CodeGen support for ANDI16 instruction
Zoran Jovanovic [Wed, 5 Nov 2014 17:43:00 +0000 (17:43 +0000)]
ps][microMIPS] Implement CodeGen support for ANDI16 instruction

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

10 years ago[Hexagon] [NFC] Alphabetizing cmake files.
Colin LeMahieu [Wed, 5 Nov 2014 17:38:48 +0000 (17:38 +0000)]
[Hexagon] [NFC] Alphabetizing cmake files.

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

10 years agops][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
Zoran Jovanovic [Wed, 5 Nov 2014 17:38:31 +0000 (17:38 +0000)]
ps][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions

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

10 years ago[ARM] Remove another redundant assignment.
Tilmann Scheller [Wed, 5 Nov 2014 17:34:04 +0000 (17:34 +0000)]
[ARM] Remove another redundant assignment.

Found by the Clang static analyzer.

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

10 years ago[mips][microMIPS] Implement ANDI16 instruction
Zoran Jovanovic [Wed, 5 Nov 2014 17:31:00 +0000 (17:31 +0000)]
[mips][microMIPS] Implement ANDI16 instruction

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

10 years ago[ARM] Remove redundant assignment.
Tilmann Scheller [Wed, 5 Nov 2014 17:28:19 +0000 (17:28 +0000)]
[ARM] Remove redundant assignment.

Found by the Clang static analyzer.

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

10 years ago[dfsan] Abort at runtime on indirect calls to uninstrumented vararg functions.
Peter Collingbourne [Wed, 5 Nov 2014 17:21:00 +0000 (17:21 +0000)]
[dfsan] Abort at runtime on indirect calls to uninstrumented vararg functions.

We currently have no infrastructure to support these correctly.

This is accomplished by generating a call to a runtime library function that
aborts at runtime in place of the regular wrapper for such functions. Direct
calls are rewritten in the usual way during traversal of the caller's IR.

We also remove the "split-stack" attribute from such wrappers, as the code
generator cannot currently handle split-stack vararg functions.

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

10 years agoIR: MDNode => Value: NamedMDNode::addOperand()
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 17:16:09 +0000 (17:16 +0000)]
IR: MDNode => Value: NamedMDNode::addOperand()

Change `NamedMDNode::addOperand()` to take a `Value *` instead of an
`MDNode *`.  This is part of PR21433.

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

10 years ago[ARM] Remove dead code identified by the Clang static analyzer.
Tilmann Scheller [Wed, 5 Nov 2014 17:10:43 +0000 (17:10 +0000)]
[ARM] Remove dead code identified by the Clang static analyzer.

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

10 years ago[mips][microMIPS] Mark symbols as microMIPS if necessary
Zoran Jovanovic [Wed, 5 Nov 2014 16:35:20 +0000 (16:35 +0000)]
[mips][microMIPS] Mark symbols as microMIPS if necessary
Differential Revision: http://reviews.llvm.org/D6039

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

10 years agoReverted revisions 221351, 221352 and 221353.
Zoran Jovanovic [Wed, 5 Nov 2014 16:19:59 +0000 (16:19 +0000)]
Reverted revisions 221351, 221352 and 221353.

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

10 years ago[mips][microMIPS] Implement CodeGen support for ANDI16 instruction
Zoran Jovanovic [Wed, 5 Nov 2014 15:54:05 +0000 (15:54 +0000)]
[mips][microMIPS] Implement CodeGen support for ANDI16 instruction
Differential Revision: http://reviews.llvm.org/D5797

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

10 years ago[mips][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
Zoran Jovanovic [Wed, 5 Nov 2014 15:46:53 +0000 (15:46 +0000)]
[mips][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
Differential Revision: http://reviews.llvm.org/D5933

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

10 years ago[mips][microMIPS] Implement ANDI16 instruction
Zoran Jovanovic [Wed, 5 Nov 2014 15:39:41 +0000 (15:39 +0000)]
[mips][microMIPS] Implement ANDI16 instruction
Differential Revision: http://reviews.llvm.org/D5163

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

10 years agoR600/SI: Change all instruction assembly names to lowercase.
Tom Stellard [Wed, 5 Nov 2014 14:50:53 +0000 (14:50 +0000)]
R600/SI: Change all instruction assembly names to lowercase.

This matches the format produced by the AMD proprietary driver.

//==================================================================//
// Shell script for converting .ll test cases: (Pass the .ll files
   you want to convert to this script as arguments).
//==================================================================//

; This was necessary on my system so that A-Z in sed would match only
; upper case.  I'm not sure why.
export LC_ALL='C'

TEST_FILES="$*"

MATCHES=`grep -v Patterns SIInstructions.td | grep -o '"[A-Z0-9_]\+["e]' | grep -o '[A-Z0-9_]\+' | sort -r`

for f in $TEST_FILES; do
  # Check that there are SI tests:
  grep -q -e 'verde' -e 'bonaire' -e 'SI' -e 'tahiti' $f
  if [ $? -eq 0 ]; then
    for match in $MATCHES; do
      sed -i -e "s/\([ :]$match\)/\L\1/" $f
    done

    # Try to get check lines with partial instruction names
    sed -i 's/\(;[ ]*SI[A-Z\\-]*: \)\([A-Z_0-9]\+\)/\1\L\2/' $f
  fi
done

sed -i -e 's/bb0_1/BB0_1/g' ../../../test/CodeGen/R600/infinite-loop.ll
sed -i -e 's/SI-NOT: bfe/SI-NOT: {{[^@]}}bfe/g'../../../test/CodeGen/R600/llvm.AMDGPU.bfe.*32.ll ../../../test/CodeGen/R600/sext-in-reg.ll
sed -i -e 's/exp_IEEE/EXP_IEEE/g' ../../../test/CodeGen/R600/llvm.exp2.ll
sed -i -e 's/numVgprs/NumVgprs/g' ../../../test/CodeGen/R600/register-count-comments.ll
sed -i 's/\(; CHECK[-NOT]*: \)\([A-Z_0-9]\+\)/\1\L\2/' ../../../test/CodeGen/R600/select64.ll ../../../test/CodeGen/R600/sgpr-copy.ll

//==================================================================//
// Shell script for converting .td files (run this last)
//==================================================================//

export LC_ALL='C'
sed -i -e '/Patterns/!s/\("[A-Z0-9_]\+[ "e]\)/\L\1/g' SIInstructions.td
sed -i -e 's/"EXP/"exp/g' SIInstrInfo.td

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

10 years agoR600/SI: Add an extra check line to make test more strict
Tom Stellard [Wed, 5 Nov 2014 14:50:34 +0000 (14:50 +0000)]
R600/SI: Add an extra check line to make test more strict

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

10 years agoAdd a LLVM_BUILD_STATIC option to cmake.
Rafael Espindola [Wed, 5 Nov 2014 14:03:58 +0000 (14:03 +0000)]
Add a LLVM_BUILD_STATIC option to cmake.

Setting it to true causes all executables to be statically linked.

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

10 years ago[X86] Teach method 'isVectorClearMaskLegal' how to check for legal blend masks.
Andrea Di Biagio [Wed, 5 Nov 2014 13:04:14 +0000 (13:04 +0000)]
[X86] Teach method 'isVectorClearMaskLegal' how to check for legal blend masks.

This patch improves the folding of vector AND nodes into blend operations for
targets that feature SSE4.1. A vector AND node where one of the operands is
a constant build_vector with elements that are either zero or all-ones can be
converted into a blend.

This allows for example to simplify the following code:

define <4 x i32> @test(<4 x i32> %A, <4 x i32> %B) {
  %1 = and <4 x i32> %A, <i32 0, i32 0, i32 0, i32 -1>
  %2 = and <4 x i32> %B, <i32 -1, i32 -1, i32 -1, i32 0>
  %3 = or <4 x i32> %1, %2
  ret <4 x i32> %3
}

Before this patch llc (-mcpu=corei7) generated:
        andps  LCPI1_0(%rip), %xmm0, %xmm0
        andps  LCPI1_1(%rip), %xmm1, %xmm1
        orps   %xmm1, %xmm0, %xmm0
        retq

With this patch we generate a single 'vpblendw'.

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

10 years agoFix bashism in tests added by r221341
Oliver Stannard [Wed, 5 Nov 2014 12:40:21 +0000 (12:40 +0000)]
Fix bashism in tests added by r221341

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

10 years ago[ARM] Honor FeatureD16 in the assembler and disassembler
Oliver Stannard [Wed, 5 Nov 2014 12:06:39 +0000 (12:06 +0000)]
[ARM] Honor FeatureD16 in the assembler and disassembler

Some ARM FPUs only have 16 double-precision registers, rather than the
normal 32. LLVM represents this with the D16 target feature. This is
currently used by CodeGen to avoid using high registers when they are
not available, but the assembler and disassembler do not.

I fix this in the assmebler and disassembler rather than the
InstrInfo.td files, as the latter would require a large number of
changes everywhere one of the floating-point instructions is referenced
in the backend. This solution is similar to the one used for
co-processor numbers and MSR masks.

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

10 years agoImprove logic that decides if its profitable to commute when some of the virtual...
Craig Topper [Wed, 5 Nov 2014 06:43:02 +0000 (06:43 +0000)]
Improve logic that decides if its profitable to commute when some of the virtual registers involved have uses/defs chains connecting them to physical register. Fix up the tests that this change improves.

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

10 years agollvm/test/Transforms/GCOVProfiling: Avoid to parse backslashes in MDString. Use ...
NAKAMURA Takumi [Wed, 5 Nov 2014 06:29:05 +0000 (06:29 +0000)]
llvm/test/Transforms/GCOVProfiling: Avoid to parse backslashes in MDString. Use %/T instead of %T.

LLVM Parser decodes "\bb" as hex in "C:\bb-win7\buildername\build...", with MDString.

See also, http://llvm.org/docs/LangRef.html#metadata-nodes-and-metadata-strings

This reverts r221270, "Disable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating."

FIXME: Please check EC in GCOVProfiler::emitProfileNotes().

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

10 years agollvm-readobj: Add support for dumping the DOS header in PE files
David Majnemer [Wed, 5 Nov 2014 06:24:35 +0000 (06:24 +0000)]
llvm-readobj: Add support for dumping the DOS header in PE files

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

10 years agoRevert 220932.
Jiangning Liu [Wed, 5 Nov 2014 04:44:31 +0000 (04:44 +0000)]
Revert 220932.

Commit 220932 caused crash when building clang-tblgen on aarch64 debian target,
so it's blocking all daily tests.

The std::call_once implementation in pthread has bug for aarch64 debian.

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

10 years agoIR: Metadata: Remove unnecessary dyn_cast
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 01:55:06 +0000 (01:55 +0000)]
IR: Metadata: Remove unnecessary dyn_cast

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

10 years agoFix broken C++ mode comment
Matt Arsenault [Wed, 5 Nov 2014 01:36:22 +0000 (01:36 +0000)]
Fix broken C++ mode comment

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

10 years agoInstSimplify: Exact shifts of X by Y are X if X has the lsb set
David Majnemer [Wed, 5 Nov 2014 00:59:59 +0000 (00:59 +0000)]
InstSimplify: Exact shifts of X by Y are X if X has the lsb set

Exact shifts may not shift out any non-zero bits. Use computeKnownBits
to determine when this occurs and just return the left hand side.

This fixes PR21477.

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

10 years agoAdd a check for misbehaving -Wcomment from gcc-4.7 and add
Eric Christopher [Wed, 5 Nov 2014 00:35:15 +0000 (00:35 +0000)]
Add a check for misbehaving -Wcomment from gcc-4.7 and add
-Wno-comment to the compilation flags if so.

Patch by Filipe Cabecinhas, configure regenerated by me.

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

10 years agoARM: try to add extra CS-register whenever stack alignment >= 8.
Tim Northover [Wed, 5 Nov 2014 00:27:20 +0000 (00:27 +0000)]
ARM: try to add extra CS-register whenever stack alignment >= 8.

We currently try to push an even number of registers to preserve 8-byte
alignment during a function's prologue, but only when the stack alignment is
prcisely 8. Many of the reasons for doing it apply also when that alignment > 8
(the extra store is often free, and can save another stack adjustment, though
less frequently for 16-byte stack alignment).

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

10 years agoARM/Dwarf: correctly align stack before callee-saved VPRs
Tim Northover [Wed, 5 Nov 2014 00:27:13 +0000 (00:27 +0000)]
ARM/Dwarf: correctly align stack before callee-saved VPRs

We were making an attempt to do this by adding an extra callee-saved GPR (so
that there was an even number in the list), but when that failed we went ahead
and pushed anyway.

This had a couple of potential issues:
  + The .cfi directives we emit misplaced dN because they were based on
    PrologEpilogInserter's calculation.
  + Unaligned stores can be less efficient.
  + Unaligned stores can actually fault (likely only an issue in niche cases,
    but possible).

This adds a final explicit stack adjustment if all other options fail, so that
the actual locations of the registers match up with where they should be.

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

10 years agoAnalysis: Make isSafeToSpeculativelyExecute fire less for divides
David Majnemer [Tue, 4 Nov 2014 23:49:08 +0000 (23:49 +0000)]
Analysis: Make isSafeToSpeculativelyExecute fire less for divides

Divides and remainder operations do not behave like other operations
when they are given poison: they turn into undefined behavior.

It's really hard to know if the operands going into a div are or are not
poison.  Because of this, we should only choose to speculate if there
are constant operands which we can easily reason about.

This fixes PR21412.

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

10 years agoRevert "[Reassociate] Canonicalize negative constants out of expressions."
Reid Kleckner [Tue, 4 Nov 2014 23:42:45 +0000 (23:42 +0000)]
Revert "[Reassociate] Canonicalize negative constants out of expressions."

This reverts commit r221171.

It performs this invalid transformation:
-  %div.i = urem i64 -1, %add
-  %sub.i = sub i64 -2, %div.i
+  %div.i = urem i64 1, %add
+  %sub.i1 = add i64 %div.i, -2

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

10 years ago[X86][SSE] Enable commutation for SSE immediate blend instructions
Simon Pilgrim [Tue, 4 Nov 2014 23:25:08 +0000 (23:25 +0000)]
[X86][SSE] Enable commutation for SSE immediate blend instructions

Patch to allow (v)blendps, (v)blendpd, (v)pblendw and vpblendd instructions to be commuted - swaps the src registers and inverts the blend mask.

This is primarily to improve memory folding (see new tests), but it also improves the quality of shuffles (see modified tests).

Differential Revision: http://reviews.llvm.org/D6015

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

10 years agoRevert earlier change removing setPreservesCFG from instcombine (r221223) and
Mark Heffernan [Tue, 4 Nov 2014 23:02:09 +0000 (23:02 +0000)]
Revert earlier change removing setPreservesCFG from instcombine (r221223) and
change LoopSimplifyPass to be !isCFGOnly.  The motivation for the earlier patch
(r221223) was that LoopSimplify is not preserved by instcombine though
setPreservesCFG indicates that it is.  This change fixes the issue
by making setPreservesCFG no longer imply LoopSimplifyPass, and is therefore less
invasive.

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

10 years ago[AArch64] Use the correct register class for ORR.
Juergen Ributzka [Tue, 4 Nov 2014 22:20:07 +0000 (22:20 +0000)]
[AArch64] Use the correct register class for ORR.

While fixing up the register classes in the machine combiner in a previous
commit I missed one.

This fixes the last one and adds a test case.

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

10 years agoRevert "[mips] Add names and tests for the hardware registers"
Rafael Espindola [Tue, 4 Nov 2014 22:15:05 +0000 (22:15 +0000)]
Revert "[mips] Add names and tests for the hardware registers"

This reverts commit r221299.

The tests

    LLVM :: MC/Disassembler/Mips/mips32.txt
    LLVM :: MC/Disassembler/Mips/mips32_le.txt

were failing.

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

10 years agoProvide gmlt-like inline scope information in the skeleton CU to facilitate symbolica...
David Blaikie [Tue, 4 Nov 2014 22:12:25 +0000 (22:12 +0000)]
Provide gmlt-like inline scope information in the skeleton CU to facilitate symbolication without needing the .dwo files

Clang -gsplit-dwarf self-host -O0, binary increases by 0.0005%, -O2,
binary increases by 25%.

A large binary inside Google, split-dwarf, -O0, and other internal flags
(GDB index, etc) increases by 1.8%, optimized build is 35%.

The size impact may be somewhat greater in .o files (I haven't measured
that much - since the linked executable -O0 numbers seemed low enough)
due to relocations. These relocations could be removed if we taught the
llvm-symbolizer to handle indexed addressing in the .o file (GDB can't
cope with this just yet, but GDB won't be reading this info anyway).
Also debug_ranges could be shared between .o and .dwo, though ideally
debug_ranges would get a schema that could used index(+offset)
addressing, and move to the .dwo file, then we'd be back to sharing
addresses in the address pool again.

But for now, these sizes seem small enough to go ahead with this.

Verified that no other DW_TAGs are produced into the .o file other than
subprograms and inlined_subroutines.

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

10 years agoMove cross-unit DIE caching to the DwarfFile level, so it doesn't interfere with...
David Blaikie [Tue, 4 Nov 2014 22:12:18 +0000 (22:12 +0000)]
Move cross-unit DIE caching to the DwarfFile level, so it doesn't interfere with fission-gmlt data and produce skeleton<>full unit cross referencing.

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

10 years agoDon't produce relocations for a difference in a section with no symbols.
Rafael Espindola [Tue, 4 Nov 2014 22:10:33 +0000 (22:10 +0000)]
Don't produce relocations for a difference in a section with no symbols.

We were producing a relocation for
----------------
.section foo,bar
La:
Lb:
 .long   La-Lb
--------------

but not for

---------------------
  .section foo,bar
zed:
La:
Lb:
 .long   La-Lb
----------------

This patch handles the case where both fragments are part of the first atom
in a section and there is no corresponding symbol to that atom.

This fixes pr21328.

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

10 years ago[mips] Move COP2 & COP3 load/store instructions from MipsInstrFPU.td to MipsInstrInfo...
Vasileios Kalintiris [Tue, 4 Nov 2014 21:45:16 +0000 (21:45 +0000)]
[mips] Move COP2 & COP3 load/store instructions from MipsInstrFPU.td to MipsInstrInfo.td. NFC.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5843

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

10 years ago[mips] Add names and tests for the hardware registers
Vasileios Kalintiris [Tue, 4 Nov 2014 21:30:44 +0000 (21:30 +0000)]
[mips] Add names and tests for the hardware registers

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5763

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

10 years ago[X86] Add 'FeatureSlowSHLD' to cpu 'bdver3'. Also explicit set FeatureAVX and Feature...
Andrea Di Biagio [Tue, 4 Nov 2014 21:18:09 +0000 (21:18 +0000)]
[X86] Add 'FeatureSlowSHLD' to cpu 'bdver3'. Also explicit set FeatureAVX and FeatureSSE4A for all the bdver* cpus.

This patch adds 'FeatureSlowSHLD' to 'bdver3'.
According to the official AMD optimization guide for amdfam15: "Using
alternative code in place of SHLD achieves lower overall latency and
requires fewer execution resources. The 32-bit and 64-bit forms of
ADD, ADC, SHR, and LEA (except 16-bit form) are DirectPath
instructions, while SHLD is a VectorPath instruction."

This patch also explicitly sets feature AVX and SSE4A for all the bdver*
cpus. This part of the patch is a non-functional change and it is mainly
done for clarity reasons (Both XOP and FMA4 already imply AVX and SSE4A).

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

10 years agoErrorOr: Be more explicit in the implicit conversion to bool docs
Justin Bogner [Tue, 4 Nov 2014 21:01:48 +0000 (21:01 +0000)]
ErrorOr: Be more explicit in the implicit conversion to bool docs

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

10 years ago[PBQP] Callee saved regs should have a higher cost than scratch regs
Arnaud A. de Grandmaison [Tue, 4 Nov 2014 20:51:29 +0000 (20:51 +0000)]
[PBQP] Callee saved regs should have a higher cost than scratch regs

Registers are not all equal. Some are not allocatable (infinite cost),
some have to be preserved but can be used, and some others are just free
to use.

Ensure there is a cost hierarchy reflecting this fact, so that the
allocator will favor scratch registers over callee-saved registers.

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

10 years ago[PBQP] Tweak spill costs and coalescing benefits
Arnaud A. de Grandmaison [Tue, 4 Nov 2014 20:51:24 +0000 (20:51 +0000)]
[PBQP] Tweak spill costs and coalescing benefits

This patch improves how the different costs (register, interference, spill
and coalescing) relates together. The assumption is now that:
 - coalescing (or any other "side effect" of reg alloc) is negative, and
   instead of being derived from a spill cost, they use the block
   frequency info.
 - spill costs are in the [MinSpillCost:+inf( range
 - register or interference costs are in [0.0:MinSpillCost( or +inf

The current MinSpillCost is set to 10.0, which is a random value high
enough that the current constraint builders do not need to worry about
when settings costs. It would however be worth adding a normalization
step for register and interference costs as the last step in the
constraint builder chain to ensure they are not greater than SpillMinCost
(unless this has some sense for some architectures). This would work well
with the current builder pipeline, where all costs are tweaked relatively
to each others, but could grow above MinSpillCost if the pipeline is
deep enough.

The current heuristic is tuned to depend rather on the number of uses of
a live interval rather than a density of uses, as used by the greedy
allocator. This heuristic provides a few percent improvement on a number
of benchmarks (eembc, spec, ...) and will definitely need to change once
spill placement is implemented: the current spill placement is really
ineficient, so making the cost proportionnal to the number of use is a
clear win.

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

10 years agoR600/SI: Rename div_scale dest operands to match documentation
Matt Arsenault [Tue, 4 Nov 2014 20:29:20 +0000 (20:29 +0000)]
R600/SI: Rename div_scale dest operands to match documentation

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

10 years agoAArch64: Pattern match integer vector abs like we do on ARM.
Benjamin Kramer [Tue, 4 Nov 2014 20:10:06 +0000 (20:10 +0000)]
AArch64: Pattern match integer vector abs like we do on ARM.

This kind of pattern is emitted by the loop vectorizer.

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

10 years ago[asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar...
Kostya Serebryany [Tue, 4 Nov 2014 19:46:15 +0000 (19:46 +0000)]
[asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar Sukhani

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

10 years agoRemove unused DisableRedZone option.
Rafael Espindola [Tue, 4 Nov 2014 18:18:52 +0000 (18:18 +0000)]
Remove unused DisableRedZone option.

Patch by Steve King.

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

10 years agoInstSimplify: Fold a hasNoSignedWrap() call into a match() expression
David Majnemer [Tue, 4 Nov 2014 17:47:13 +0000 (17:47 +0000)]
InstSimplify: Fold a hasNoSignedWrap() call into a match() expression

No functionality change intended, it's just a little more concise.

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

10 years agoInstSimplify: Fold a hasNoUnsignedWrap() call into a match() expression
David Majnemer [Tue, 4 Nov 2014 17:38:50 +0000 (17:38 +0000)]
InstSimplify: Fold a hasNoUnsignedWrap() call into a match() expression

No functionality change intended, it's just a little more concise.

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

10 years ago[mips] Improve support for the .set mips16/nomips16 assembler directives.
Toma Tabacu [Tue, 4 Nov 2014 17:18:07 +0000 (17:18 +0000)]
[mips] Improve support for the .set mips16/nomips16 assembler directives.

Summary:
Appropriately set/clear the FeatureBit for Mips16 when these assembler directives are used and also emit ".set nomips16" (previously, only ".set mips16" was being emitted).

These improvements allow for better testing of the .cpload/.cprestore assembler directives (which are not supposed to work when Mips16 is enabled).

Test Plan: The test is bare-bones because there are no MC tests for Mips16 instructions (there's only one, which checks that the Mips16 ELF header flag gets set), and that suggests to me that it has not been implemented yet in the IAS.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5462

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

10 years ago[Stackmaps] Make test less fragile. NFC.
Juergen Ributzka [Tue, 4 Nov 2014 17:11:00 +0000 (17:11 +0000)]
[Stackmaps] Make test less fragile. NFC.

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

10 years agoremove function names from comments; NFC
Sanjay Patel [Tue, 4 Nov 2014 16:27:42 +0000 (16:27 +0000)]
remove function names from comments; NFC

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

10 years agofix typo in comment
Sanjay Patel [Tue, 4 Nov 2014 16:09:50 +0000 (16:09 +0000)]
fix typo in comment

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

10 years agoDisable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating.
NAKAMURA Takumi [Tue, 4 Nov 2014 14:41:53 +0000 (14:41 +0000)]
Disable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating.

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

10 years agoRemove "REQUIRES:shell" from tests. They work for me.
NAKAMURA Takumi [Tue, 4 Nov 2014 13:41:33 +0000 (13:41 +0000)]
Remove "REQUIRES:shell" from tests. They work for me.

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

10 years ago[yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag
Simon Atanasyan [Tue, 4 Nov 2014 13:33:36 +0000 (13:33 +0000)]
[yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag

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

10 years agoRe-enable tests in llvm/test/Object, corresponding to line_iterator's
NAKAMURA Takumi [Tue, 4 Nov 2014 13:19:29 +0000 (13:19 +0000)]
Re-enable tests in llvm/test/Object, corresponding to line_iterator's
change in r221153.

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

10 years agollvm/test/Transforms/GCOVProfiling/linezero.ll: Use %/T instead of %T in regex. This...
NAKAMURA Takumi [Tue, 4 Nov 2014 13:00:48 +0000 (13:00 +0000)]
llvm/test/Transforms/GCOVProfiling/linezero.ll: Use %/T instead of %T in regex. This works on win32.

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

10 years agoRemove FindProgramByName. NFC.
Rafael Espindola [Tue, 4 Nov 2014 12:35:47 +0000 (12:35 +0000)]
Remove FindProgramByName. NFC.

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

10 years agoFix Visual C++ warning, Program.inc(85): warning C4018: '<' : signed/unsigned mismatch.
Yaron Keren [Tue, 4 Nov 2014 09:22:41 +0000 (09:22 +0000)]
Fix Visual C++ warning, Program.inc(85): warning C4018: '<' : signed/unsigned mismatch.

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

10 years agoAdd missing tests for build attribute encodings in object files.
Charlie Turner [Tue, 4 Nov 2014 09:07:40 +0000 (09:07 +0000)]
Add missing tests for build attribute encodings in object files.

test/MC/ARM/directive-eabi_attribute.s was missing several tests of object file
encodings relative to the existing tests for assembly file encodings. This
commit adds the missing tests.

Change-Id: Ie110ca02b65e8f4d4c77f437bd09d03607fa5c0d

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

10 years agollvm-objdump: Pass DiceTableEntry by reference
David Majnemer [Tue, 4 Nov 2014 08:41:48 +0000 (08:41 +0000)]
llvm-objdump: Pass DiceTableEntry by reference

DiceTableEntry is 24 bytes on my machine, it's probably better to pass
them by reference.

This fixes PR21464.

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

10 years agosys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to...
NAKAMURA Takumi [Tue, 4 Nov 2014 08:17:15 +0000 (08:17 +0000)]
sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to appease clang Driver's tests.

It seems SearchPath() doesn't show actual extension on the filesystem.

FIXME: Shall we use FindFirstFile() here?

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

10 years agoCodeGen: Enable DWARF emission for MS ABI targets
David Majnemer [Tue, 4 Nov 2014 08:03:31 +0000 (08:03 +0000)]
CodeGen: Enable DWARF emission for MS ABI targets

This is experimental, just barely enough to get things to not
immediately combust.

A note for those who are curious:
Only lld can successfully link the object files, other linkers truncate
the section names making the debug sections illegible to debuggers.

Even with this in mind, we believe we are having trouble with SECREL
relocations.

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

10 years ago#include <winbase.h> is not enough for Visual C++ 2013, it errors:
Yaron Keren [Tue, 4 Nov 2014 07:53:30 +0000 (07:53 +0000)]
#include <winbase.h> is not enough for Visual C++ 2013, it errors:

1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C2146: syntax error : missing ';' before identifier 'nLength'
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...

including <windows.h> is actually required.

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

10 years agotest: Restore llvm-lit (at least for my machine)
David Majnemer [Tue, 4 Nov 2014 05:54:50 +0000 (05:54 +0000)]
test: Restore llvm-lit (at least for my machine)

r221137 feeds None into os.path.join which is not valid.

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

10 years agoMinimize test case further
David Majnemer [Tue, 4 Nov 2014 05:17:58 +0000 (05:17 +0000)]
Minimize test case further

No functional change intended.

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

10 years agoR600/LLVMBuild.txt: Add TransformUtils.
NAKAMURA Takumi [Tue, 4 Nov 2014 02:16:53 +0000 (02:16 +0000)]
R600/LLVMBuild.txt: Add TransformUtils.

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

10 years agoDocs: give binutils/gold instructions for CMake too.
Tim Northover [Tue, 4 Nov 2014 02:16:03 +0000 (02:16 +0000)]
Docs: give binutils/gold instructions for CMake too.

Patch by Steve King.

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

10 years agoRevert "Transforms: reapply SVN r219899"
Reid Kleckner [Tue, 4 Nov 2014 02:02:14 +0000 (02:02 +0000)]
Revert "Transforms: reapply SVN r219899"

This reverts commit r220811 and r220839. It made an incorrect change to
musttail handling.

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

10 years agoRemove setPreservesCFG from instcombine. The pass, in particular, does not
Mark Heffernan [Tue, 4 Nov 2014 01:51:01 +0000 (01:51 +0000)]
Remove setPreservesCFG from instcombine.  The pass, in particular, does not
preserve LoopSimplify because instcombine may replace branch predicates
with undef which loop simplify then replaces with always exit.  Replace
setPreservesCFG with the more constrained preservation of DomTree and
LoopInfo.

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

10 years agoUse findProgramByName.
Michael J. Spencer [Tue, 4 Nov 2014 01:29:59 +0000 (01:29 +0000)]
Use findProgramByName.

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

10 years ago[Support][Program] Add findProgramByName(Name, OptionalPaths)
Michael J. Spencer [Tue, 4 Nov 2014 01:29:29 +0000 (01:29 +0000)]
[Support][Program] Add findProgramByName(Name, OptionalPaths)

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

10 years agoUse the LLVM_GNUC_PREREQ macro instead of the longhand version check
Reid Kleckner [Tue, 4 Nov 2014 01:28:33 +0000 (01:28 +0000)]
Use the LLVM_GNUC_PREREQ macro instead of the longhand version check

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

10 years agoRemove the END_WITH_NULL macro now that Clang doesn't use it
Reid Kleckner [Tue, 4 Nov 2014 01:15:53 +0000 (01:15 +0000)]
Remove the END_WITH_NULL macro now that Clang doesn't use it

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