Commit Graph

125478 Commits

Author SHA1 Message Date
Changpeng Fang
4990717b55 Revert "AMDGPU/SI: Test commit"
This reverts commit a493cb636e0152ad28210934a47c6c44b1437193.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256021 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 20:04:26 +00:00
Changpeng Fang
dce96eea12 AMDGPU/SI: Test commit
Summary: This is just my first commit. Test!

Reviewers: none

Subscribers: none

Differential Revision: none

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256020 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 19:57:41 +00:00
Rafael Espindola
f11617b0ab Drop support for dematerializing.
It was only used on lib/Linker and the use was "dead" since it was used on a
function the IRMover had just moved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 19:57:26 +00:00
Pete Cooper
11fd7a2269 Revert "Improve DWARFDebugFrame::parse to also handle __eh_frame."
This reverts commit r256008.

Its breaking multiple buildbots, although works for me locally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256013 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 19:45:38 +00:00
Teresa Johnson
18f59c52f2 Rename variables to reflect linker split (NFC)
Renamed variables to be more reflective of whether they are
an instance of Linker, IRLinker or ModuleLinker. Also fix a stale
comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256011 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 19:28:59 +00:00
Eric Christopher
96e80fcbfd Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs().
Also add print() functions.

Patch by Justin Lebar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256010 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 18:55:26 +00:00
Eric Christopher
8281fa7838 Add a dump method for ArgList.
Patch by Justin Lebar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256009 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 18:55:22 +00:00
Pete Cooper
3c9c3bf291 Improve DWARFDebugFrame::parse to also handle __eh_frame.
LLVM MC has single methods which can handle the output of EH frame and DWARF CIE's and FDE's.

This code improves DWARFDebugFrame::parse to do the same for parsing.

This also allows llvm-objdump to support the --dwarf=frames option which objdump supports.  This
option dumps the .eh_frame section using the new code in DWARFDebugFrame::parse.

http://reviews.llvm.org/D15535

Reviewed by Rafael Espindola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256008 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 18:51:08 +00:00
Krzysztof Parzyszek
4aba1843f2 Recognize strings for Hexagon-specific variant kinds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256007 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 18:47:27 +00:00
Andrew Kaylor
81cf167ed6 [WinEH] Update LCSSA to handle catchswitch with handlers inside and outside a loop
Differential Revision: http://reviews.llvm.org/D15630



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256005 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 18:12:35 +00:00
Jun Bum Lim
cb2bad780b [AArch64] Promote loads from stores
This change promotes load instructions which directly read from stores by
replacing them with mov instructions. If the store is wider than the load,
the load will be replaced with a bitfield extract.
For example :
  STRWui %W1, %X0, 1
  %W0 = LDRHHui %X0, 3
becomes
  STRWui %W1, %X0, 1
  %W0 = UBFMWri %W1, 16, 31

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256004 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 18:08:30 +00:00
Teresa Johnson
e8df234a6e [ThinLTO/LTO] Don't link in unneeded metadata
Summary:
Third patch split out from http://reviews.llvm.org/D14752.

Only map in needed DISubroutine metadata (imported or otherwise linked
in functions and other DISubroutine referenced by inlined instructions).
This is supported for ThinLTO, LTO and llvm-link --only-needed, with
associated tests for each one.

Depends on D14838.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256003 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 17:51:37 +00:00
Rafael Espindola
ec08d99fee Handle archives with paths in the names.
We always create archives with just he filename as the member name, but
other archives can put a more complicated path in there.

This patches handles it by computing just the filename as we do when
adding a new member.

If storing the path is important for some reason, we should probably
have an orthogonal option for doing that and do it for both old and new
members.

Fixes pr25877.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256001 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 16:07:17 +00:00
Rafael Espindola
7ba635bae3 clang-format to reduce diff in another patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 14:06:34 +00:00
Rafael Espindola
bd92ab18a0 Fix error handling in LLVMGetBitcodeModuleInContext.
It was not setting OutMessage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255998 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 13:58:05 +00:00
Vaivaswatha Nagaraj
5a9e526f29 GlobalsAA: Take advantage of ArgMemOnly, InaccessibleMemOnly and InaccessibleMemOrArgMemOnly attributes
Summary:
1. Modify AnalyzeCallGraph() to retain function info for external functions
if the function has [InaccessibleMemOr]ArgMemOnly flags.
2. When analyzing the use of a global is function parameter at a call site,
mark the callee also as modifying the global appropriately.
3. Add additional test cases.

Depends on D15499

Reviewers: hfinkel, jmolloy

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255994 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 11:02:52 +00:00
Zlatko Buljan
35e39f0c8a [mips][microMIPS][DSP] Implement PACKRL.PH, PICK.PH, PICK.QB, SHILO, SHILOV and WRDSP instructions
Differential Revision: http://reviews.llvm.org/D14429


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255991 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 08:59:37 +00:00
Rafael Espindola
0b270d1d74 Add a test for LLVMGetBitcodeModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255985 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 03:57:26 +00:00
Philip Reames
2027fcbfda [RS4GC] Use an value handle to help isolate errors quickly
Inspired by the bug reported in 25846.  Whatever we end up doing about that one, the value handle change is a generally good one since it will help catch this type of mistake more quickly.

Patch by: Manuel Jacob



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255984 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 03:53:28 +00:00
Rafael Espindola
1fef99c857 clang-format to reduce diff in another patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255981 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 03:04:52 +00:00
Vedant Kumar
5862853db7 Revert "[Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs"
This reverts commit r255977. This is part of
http://reviews.llvm.org/D15634.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255978 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 02:30:45 +00:00
Vedant Kumar
e116b5537d [Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255977 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 02:27:52 +00:00
Eric Christopher
cca8dbee4e Reorganize the C API headers to improve build times.
Type specific declarations have been moved to Type.h and error handling
routines have been moved to ErrorHandling.h. Both are included in Core.h
so nothing should change for projects directly including the headers,
but transitive dependencies may be affected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255965 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 01:46:52 +00:00
NAKAMURA Takumi
ce00641ac5 BranchProbabilityTest.cpp: Suppress warnings. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255940 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 00:18:18 +00:00
Eric Christopher
a07559388f Remove unused class variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255939 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 23:43:40 +00:00
Hans Wennborg
449ad4ca3b [X86] Use push-pop for materializing small constants under 'minsize'
Use the 3-byte (4 with REX prefix) push-pop sequence for materializing
small constants. This is smaller than using a mov (5, 6 or 7 bytes
depending on size and REX prefix), but it's likely to be slower, so
only used for 'minsize'.

This is a follow-up to r255656.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255936 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 23:18:39 +00:00
Cong Hou
4c24184936 [BranchProbability] Remove the restriction that known and unknown probabilities cannot coexist when being normalized.
The current BranchProbability::normalizeProbabilities() forbids known and
unknown probabilities to coexist in the list. This was once used to help
capture probability exceptions but has caused some reported build
failures (https://llvm.org/bugs/show_bug.cgi?id=25838).

This patch removes this restriction by evenly distributing the complement
of the sum of all known probabilities to unknown ones. We could still
treat this as an abnormal behavior, but it is better to emit warnings in
our future profile validator.


Differential revision: http://reviews.llvm.org/D15548




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255934 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 22:27:07 +00:00
Philip Reames
b96976e30d [InstCombine] Extend peephole DSE to handle unordered atomics
This extends the same line of reasoning used in EarlyCSE w/http://reviews.llvm.org/D15352 to the DSE implementation in InstCombine.

Key points:
 * We only remove unordered or simple stores.
 * The loads producing values consumed by dead stores don't influence whether the store is dead.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255932 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 22:19:27 +00:00
JF Bastien
7e54c38de0 Polish atomic pointers
Summary:
I didn't realize that we already allowed atomic load/store of pointers,
it was added in 2012 by r162146. This patch updates the documentation
and tightens the verifier by using DataLayout to make sure that the
stored size is byte-sized and power-of-two. DataLayout is also used for
integers, and while I'm here I updated the corresponding code for
cmpxchg and rmw.

See the following discussion for context and upcoming changes to
add floating-point and vector atomics:
  https://groups.google.com/forum/#!topic/llvm-dev/Nh0P_E3CRoo/discussion

Reviewers: reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255931 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 22:09:19 +00:00
Rafael Espindola
5d2e46b5fa Pass -m elf_x84_64 to gold invocations.
Fixes pr25868.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255930 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 21:56:27 +00:00
Matthew Simpson
30e21e7109 Revert "[AArch64] Add DAG combine for extract extend pattern"
This reverts commit r255895. The patch breaks internal tests. Reverting until a
fix is ready.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255928 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 21:29:47 +00:00
Rafael Espindola
50005f6837 Drop function that are deprecated since 2010.
These functions were deprecated in r97608.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255927 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 21:16:12 +00:00
Dave Bartolomeo
8cf8b10a59 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255926 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 20:54:16 +00:00
Dan Gohman
adfb389708 [WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255925 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 20:50:45 +00:00
Vedant Kumar
b12341d9ee [docs] Motivate ninja in GettingStarted.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255924 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 20:49:48 +00:00
Sanjoy Das
4b892417a6 [SCEV] Add and use SCEVConstant::getAPInt; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255921 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 20:28:46 +00:00
Weiming Zhao
e78257c891 [InstCombine] Adding "\n" to debug output. NFC.
Summary:
[InstCombine] Adding '\n' to debug output. NFC.

Patch by Zhaoshi Zheng <zhaoshiz@codeaurora.org>

Reviewers: apazos, majnemer, weimingz

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255920 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 19:53:41 +00:00
Adrian Prantl
cb24ca96cd Hardcode the target in this testcase — it depends on the ABI.
This fixes a failure on Windows buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 19:33:56 +00:00
Philip Reames
b14726242c [EarlyCSE] DSE of atomic unordered stores
The rules for removing trivially dead stores are a lot less complicated than loads. Since we know the later store post dominates the former and the former dominates the later, unless the former has side effects other than the actual store, we can remove it. One slightly surprising thing is that we can freely remove atomic stores, even if the later one isn't atomic. There's no guarantee the atomic one was every visible.

For the moment, we don't handle DSE of ordered atomic stores. We could extend the same chain of reasoning to them, but the catch is we'd then have to model the ordering effect without a store instruction. Since our fences are a stronger than our operation orderings, simple using a fence isn't an obvious win. This arguable calls for a refinement in our fence specification, but that's (much) later work.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255914 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 18:50:50 +00:00
Adrian Prantl
017de8d08b make this test less whitespace-sensitive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255913 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 18:34:37 +00:00
Adrian Prantl
83af682cad Rewrite test to use llvm-dwarfdump instead of checking for asm comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255912 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 18:25:51 +00:00
Teresa Johnson
d0f8afa9b6 [ThinLTO] Metadata linking for imported functions
Summary:
Second patch split out from http://reviews.llvm.org/D14752.

Maps metadata as a post-pass from each module when importing complete,
suturing up final metadata to the temporary metadata left on the
imported instructions.

This entails saving the mapping from bitcode value id to temporary
metadata in the importing pass, and from bitcode value id to final
metadata during the metadata linking postpass.

Depends on D14825.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255909 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 17:14:09 +00:00
Tom Stellard
55618d8f5c AMDGPU/SI: Reserve appropriate number of sgprs for flat scratch init.
Reviewers: tstellarAMD

Subscribers: arsenm, llvm-commits

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

Patch by: Changpeng Fang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255908 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 17:05:09 +00:00
Nicolai Haehnle
7c502030bf AMDGPU: Fix off-by-one in SIRegisterInfo::eliminateFrameIndex
Summary:
The method insertNOPs expected the number of wait states to be passed as
parameter, while eliminateFrameIndex passed the immediate argument for the
S_NOP, leading to an off-by-one error. Rename the method to make the
meaning of its parameter clearer. The number of 4 / 5 wait states (which
is what the method has always _tried_ to do according to the comment) is
correct according to the hardware docs.

I stumbled upon this while trying to track down the cause of
https://bugs.freedesktop.org/show_bug.cgi?id=93264. While clearly needed,
this patch unfortunately does not fix that bug...

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255906 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 16:46:42 +00:00
Andy Gibbs
02fd5dfa7c Revert r254592 (virtual dtor in SCEVPredicate).
Clang has better diagnostics in this case.  It is not necessary therefore
to change the destructor to avoid what is effectively an invalid warning
in gcc.  Instead, better handle the warning flags given to the compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 16:43:53 +00:00
Teresa Johnson
a8b43ff7ef Mark a couple ModuleLinker member functions as const (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255903 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 16:34:53 +00:00
Rafael Espindola
cdfe790540 Avoid explicit relocation sorting most of the time.
These days relocations are created and stored in a deterministic way.
The order they are created is also suitable for the .o file, so we don't
need an explicit sort.

The last remaining exception is MIPS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255902 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 16:22:06 +00:00
Rafael Espindola
7396da8120 Revert "[AArch64] Enable PostRAScheduler for AArch64 generic build"
This reverts commit r255896. It broke the tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255899 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 15:12:26 +00:00
Rafael Espindola
f50f96be5d Always sort by offset first. NFC.
Every target changing sortRelocs was first calling the parent
implementation. Just run that first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 15:08:24 +00:00
Diego Novillo
b8e9fb8816 Fix unused variable warning in release builds. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255897 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 14:58:34 +00:00