Commit Graph

133629 Commits

Author SHA1 Message Date
Amaury Sechet
4e14c8337b Add support for callsite in the new C API for attributes
Summary: The second consumer of attributes.

Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight

Subscribers: mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272754 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 05:14:29 +00:00
Sanjoy Das
f23728924d [SCEV] clang-format some sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272753 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 04:37:50 +00:00
Sanjoy Das
b5157451ca [SCEV] Change the interface for SolveQuadraticEquation; NFC
Use Optional<T> to denote the absence of a solution, not
SCEVCouldNotCompute.  This makes the usage of SolveQuadraticEquation
somewhat simpler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 04:37:47 +00:00
Tom Stellard
48dc37bc22 AMDGPU/SI: Correctly encode constant expressions
Summary:
We we have an MCConstantExpr, we can encode it directly into the instruction
instead of emitting fixups.

Reviewers: artem.tamazov, vpykhtin, SamWot, nhaustov, arsenm

Subscribers: arsenm, llvm-commits, kzhuravl

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

Change-Id: I88b3edf288d48e65c5d705fc4850d281f8e36948

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272750 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 03:09:39 +00:00
Xinliang David Li
b2ccb9b91c [MBP] add comments and bug fix
Document the new parameter and threshod computation
model.  Also fix a bug when the threshold parameter
is set to be different from the default.

 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 03:03:30 +00:00
Tom Stellard
22d1d41d2d AMDGPU/AsmParser: Add support for parsing symbol operands
Summary:
We can now reference symbols directly in operands, like this:
s_mov_b32 s0, global

Reviewers: artem.tamazov, vpykhtin, SamWot, nhaustov

Subscribers: arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272748 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 02:54:14 +00:00
Dan Liew
7029af9787 [LibFuzzer] Fix `FuzzerMutate.ShuffleBytes2` unit test on OSX.
The ``FuzzerMutate.ShuffleBytes2`` unit test was failing on
OSX due to the implementation of ``std::random_shuffle()``
being different between libcxx and libstdc++.

@kcc has decided (see http://reviews.llvm.org/D21218) it is acceptable
for there to be different mutation behavior on different platforms so
this commit just adjusts the test to perform the minimum number of
iterations (that is a power of 2) to see all the mutations the unit test
is looking for.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272743 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 01:40:02 +00:00
Michael Kuperstein
932889b1a1 Recommit [LV] Enable vectorization of loops where the IV has an external use
r272715 broke libcxx because it did not correctly handle cases where the
last iteration of one IV is the second-to-last iteration of another.

Original commit message:
Vectorizing loops with "escaping" IVs has been disabled since r190790, due to
PR17179. This re-enables it, with support for external use of both
"post-increment" (last iteration) and "pre-increment" (second-to-last iteration)
IVs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272742 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:35:26 +00:00
Matt Arsenault
8697a18bc2 Make DetectDeadLanes preserve CFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:25:09 +00:00
David Majnemer
3df2af21e9 [LoopUnroll] Don't crash trying to unroll loop with EH pad exit
We do not support splitting cleanuppad or catchswitches.  This is
problematic for passes which assume that a loop is in loop simplify
form (the loop would have a dedicated exit block instead of sharing it).

While it isn't great that we don't support this for cleanups, we still
cannot make loop-simplify form an assertable precondition because
indirectbr will also disable these sorts of CFG cleanups.

This fixes PR28132.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:19:56 +00:00
David Majnemer
188d2b18ee [CodeView] Don't emit debuginfo for imported symbols
Emitting symbol information requires us to have a definition for the
symbol.  A symbol reference is insufficient.

This fixes PR28123.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272738 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:19:52 +00:00
David Majnemer
0c4f69f653 Remove the ScalarReplAggregates pass
Nearly all the changes to this pass have been done while maintaining and
updating other parts of LLVM.  LLVM has had another pass, SROA, which
has superseded ScalarReplAggregates for quite some time.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:19:09 +00:00
Matt Arsenault
6af03e5068 AMDGPU: Run pointer optimization passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:11:01 +00:00
Peter Collingbourne
cf9e0af1ce Verifier: check that functions have at most a single !prof attachment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272734 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 23:13:15 +00:00
Xinliang David Li
bfbb095051 Fix a test case to match its intention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 23:05:46 +00:00
Amaury Sechet
8da6b784a1 Remove unused import. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 22:30:50 +00:00
Michael Kuperstein
f1f9f2c316 Reverting r272715 since it broke libcxx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 22:30:41 +00:00
Dehao Chen
97615522d0 Set machine block placement hot prob threshold for both static and runtime profile.
Summary: With runtime profile, we have more confidence in branch probability, thus during basic block layout, we set a lower hot prob threshold so that blocks can be layouted optimally.

Reviewers: djasper, davidxl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 22:27:17 +00:00
Rui Ueyama
2c70155651 [pdbdump] Verify TPI hash for LF_ENUM type records.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 22:25:07 +00:00
Amaury Sechet
71423ee3dd Fix list of deprecated C API attribute functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 22:23:29 +00:00
Vitaly Buka
93cdb4b527 Revert "Enable libFuzzer's afl_driver to append stderr to a file."
Crashes with AddressSanitizer: SEGV on unknown address
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/9924/steps/annotate/logs/stdio

This reverts commit r272706.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 22:09:00 +00:00
Amaury Sechet
aac9882be6 Rename AttributeSetImpl::NumAttrs and AttributeSetImpl::getNumAttributes to reflect that they work on slots rather than attributes. NFC
Summary: The current naming not only doesn't convey the meaning of what this does, but worse, it convey the wrong meaning. This was a major source of confusion understanding the code, so I'm applying the boy scout rule here and making it better after I leave.

Reviewers: void, bkramer, whitequark

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272725 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 22:04:16 +00:00
Davide Italiano
7c798721d2 [PM] Port WholeProgramDevirt to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272721 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:44:19 +00:00
Michael Kuperstein
4d190088e9 [LV] Enable vectorization of loops where the IV has an external use
Vectorizing loops with "escaping" IVs has been disabled since r190790, due to
PR17179. This re-enables it, with support for external use of both
"post-increment" (last iteration) and "pre-increment" (second-to-last iteration)
IVs.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272715 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:27:27 +00:00
Sanjay Patel
8291779372 [x86] add current codegen tests for PR27924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272714 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:25:46 +00:00
Evgeniy Stepanov
6edca03e84 Add a missing test.
This is a test for r272421: Disable MSan-hostile loop unswitching.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:24:13 +00:00
Geoff Berry
dc68eca2c4 [MemorySSA] Set CFGOnly correctly for MemorySSAWrapperPass
Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272712 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:19:40 +00:00
Peter Collingbourne
63b34cdf34 IR: Introduce local_unnamed_addr attribute.
If a local_unnamed_addr attribute is attached to a global, the address
is known to be insignificant within the module. It is distinct from the
existing unnamed_addr attribute in that it only describes a local property
of the module rather than a global property of the symbol.

This attribute is intended to be used by the code generator and LTO to allow
the linker to decide whether the global needs to be in the symbol table. It is
possible to exclude a global from the symbol table if three things are true:
- This attribute is present on every instance of the global (which means that
  the normal rule that the global must have a unique address can be broken without
  being observable by the program by performing comparisons against the global's
  address)
- The global has linkonce_odr linkage (which means that each linkage unit must have
  its own copy of the global if it requires one, and the copy in each linkage unit
  must be the same)
- It is a constant or a function (which means that the program cannot observe that
  the unique-address rule has been broken by writing to the global)

Although this attribute could in principle be computed from the module
contents, LTO clients (i.e. linkers) will normally need to be able to compute
this property as part of symbol resolution, and it would be inefficient to
materialize every module just to compute it.

See:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html
for earlier discussion.

Part of the fix for PR27553.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:01:22 +00:00
Zachary Turner
7d35b2d2b1 Resubmit "[pdb] Actually write a PDB to disk from YAML.""
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21220

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272708 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 20:48:36 +00:00
Vitaly Buka
6ff3418b63 Enable libFuzzer's afl_driver to append stderr to a file.
Summary:
[libFuzzer] Enable afl_driver to append stderr to a user specified file.

Append stderr of afl_driver to the file specified by the environmental variable
AFL_DRIVER_STDERR_DUPLICATE_FILENAME if it is set. This lets users see outputs
on crashes without rerunning crashing test cases (which won't work for crashes
that are difficult to reproduce). Before this patch, stderr would only be sent to afl-fuzz
and users would have no way of seeing it.

Reviewers: llvm-commits, aizatsky, kcc, vitalybuka

Subscribers: vitalybuka

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 20:42:05 +00:00
Tom Stellard
a09ba98fef AMDGPU/SI: Refactor fixup handling for constant addrspace variables
Summary:
We now use a standard fixup type applying the pc-relative address of
constant address space variables, and we have the GlobalAddress lowering
code add the required 4 byte offset to the global address rather than
doing it as part of the fixup.

This refactoring will make it easier to use the same code for global
address space variables and also simplifies the code.

Re-commit this after fixing a bug where we were trying to use a
reference to a Triple object that had already been destroyed.

Reviewers: arsenm, kzhuravl

Subscribers: arsenm, kzhuravl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 20:29:59 +00:00
Amaury Sechet
3564e5c13d Make sure attribute kind and attributes are named respectively Kind and Attr consistently. Historically they used to be the same the terminology is very confused in the codebase. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272704 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 20:27:35 +00:00
Sanjoy Das
84225d2d9e [ValueTracking] Calls to @llvm.assume always return
This change teaches llvm::isGuaranteedToTransferExecutionToSuccessor
that calls to @llvm.assume always terminate.  Most other relevant
intrinsics should be covered by the "CS.onlyReadsMemory() ||
CS.onlyAccessesArgMemory()" bit but we were missing @llvm.assumes
because we state that it clobbers memory.

Added an LICM test case, but this change is not specific to LICM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 20:23:16 +00:00
Geoff Berry
23a0bca617 [TailDuplication] Split up NumInstrDups statistic.
Summary:
Split NumInstrDups statistic into separate added/removed counts to avoid
negative stat being printed as unsigned.

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 19:40:10 +00:00
Dan Liew
eac51a2bde [LibFuzzer] Disable the `fuzzer-trace-pc.test` test on non-linux platforms.
On OSX this test sometimes fails due to the
``LLVMFuzzer-FullCoverageSetTest-TracePC`` program going over the
default 2GiB memory limit. This shouldn't be happening and needs
investigating. For now just disable the test so we can set up an
OSX buildbot.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272696 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 19:15:13 +00:00
Wei Mi
b7b4ba37de [X86] Reduce the width of multiplification when its operands are extended from i8 or i16
For <N x i32> type mul, pmuludq will be used for targets without SSE41, which
often introduces many extra pack and unpack instructions in vectorized loop
body because pmuludq generates <N/2 x i64> type value. However when the operands
of <N x i32> mul are extended from smaller size values like i8 and i16, the type
of mul may be shrunk to use pmullw + pmulhw/pmulhuw instead of pmuludq, which
generates better code. For targets with SSE41, pmulld is supported so no
shrinking is needed.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 18:53:20 +00:00
Zachary Turner
bf3c011ba7 Revert "[pdb] Actually write a PDB to disk from YAML."
This reverts commit 879139e1c6.

This was committed accidentally when I blindly typed git svn
dcommit instead of the command to generate a patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 18:51:35 +00:00
Zachary Turner
879139e1c6 [pdb] Actually write a PDB to disk from YAML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 18:49:36 +00:00
George Burgess IV
e686c89077 [CFLAA] Tag arguments as escaped instead of unknown.
This patch also includes some refactoring.

Prior to this patch, we tagged all CFLAA attributes as unknown. This is
suboptimal, since it meant that any Value used as an argument would be
considered to alias any other Value that existed.

Now that we have the machinery to tag sets below the set for an
arbitrary value with attributes, it's okay to be less conservative with
arguments. (Specifically, we still tag the set under an argument with
unknown).

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 18:12:28 +00:00
George Burgess IV
59a348622a [CFLAA] Refactor graph-building code. NFC.
This patch refactors CFLAA's graph building code. This makes keeping
track of common state (TargetLibraryInfo, ...) easier.

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 18:02:27 +00:00
Konstantin Zhuravlyov
242d986ef1 [docs] Update AMDGPU relocation information
- Added new notation for specifying relocation calculation
  - Renamed:
    - R_AMDGPU_32_LOW -> R_AMDGPU_ABS32_LO
    - R_AMDGPU_32_HIGH -> R_AMDGPU_ABS32_HI
    - R_AMDGPU_64 -> R_AMDGPU_ABS64
  - Added:
    - R_AMDGPU_REL32
    - R_AMDGPU_REL64
    - R_AMDGPU_ABS32
  - Updated calculations for relative relocations

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 17:20:29 +00:00
Daniel Sanders
3fc85ab7c2 [FileCheck] Document --check-prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 16:42:05 +00:00
Hans Wennborg
e09bd44a40 Fix some typos in the Kaleidoscope tutorial (PR28120)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 16:05:12 +00:00
Tom Stellard
d8ffcd8311 Revert "AMDGPU/SI: Refactor fixup handling for constant addrspace variables"
This reverts commit r272675.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 15:16:35 +00:00
Tom Stellard
1a5003c59b AMDGPU/SI: Refactor fixup handling for constant addrspace variables
Summary:
We now use a standard fixup type applying the pc-relative address of
constant address space variables, and we have the GlobalAddress lowering
code add the required 4 byte offset to the global address rather than
doing it as part of the fixup.

This refactoring will make it easier to use the same code for global
address space variables and also simplifies the code.

Reviewers: arsenm, kzhuravl

Subscribers: arsenm, kzhuravl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 15:11:01 +00:00
Nirav Dave
adf7e0e7c6 Fix BSS global handling in AsmPrinter
Change EmitGlobalVariable to check final assembler section is in BSS
before using .lcomm/.comm directive. This prevents globals from being
put into .bss erroneously when -data-sections is used.

This fixes PR26570.

Reviewers: echristo, rafael

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272674 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 15:09:30 +00:00
Artem Tamazov
da10a460d7 [AMDGPU][llvm-mc] Predefined symbols to access -mcpu from the assembly source (.option.machine_version...)
The feature allows for conditional assembly etc.
TODO: make those symbols read-only.
Test added.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272673 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 15:03:59 +00:00
Sebastian Pop
7baead5234 LoopRotate: restructure code to simplify functions
We move the loop rotate functions in a separate class to avoid passing multiple
parameters to each function.  This cleanup will help with further development of
loop rotation.  NFC.

Patch written by Aditya Kumar and Sebastian Pop.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272672 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 14:44:05 +00:00
Daniel Sanders
ded4398380 [FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix options.
Summary:
This new alias takes a comma separated list of prefixes which allows
'--check-prefix=A --check-prefix=B --check-prefix=C' to be written as
'--check-prefixes=A,B,C'.

Reviewers: probinson

Subscribers: probinson, llvm-commits, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 14:28:04 +00:00
Simon Dardis
659228b9db [mips] Optimize stack pointer adjustments.
Instead of always using addu to adjust the stack pointer when the
size out is of the range of an addiu instruction, use subu so that
a smaller constant can be generated.

This can give savings of ~3 instructions whenever a function has a
a stack frame whose size is out of range of an addiu instruction.

This change may break some naive stack unwinders.

Partially resolves PR/26291.

Thanks to David Chisnall for reporting the issue.

Reviewers: dsanders, vkalintiris

Differential Review: http://reviews.llvm.org/D21321


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272666 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 13:39:43 +00:00