1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

113079 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
f85c3f9918 AsmWriter: Extract writeMetadataAsOperand(), NFC
llvm-svn: 228446
2015-02-06 22:27:22 +00:00
Evgeniy Stepanov
c071e0babc [msan] Fix "missing origin" in atomic store.
An atomic store always make the target location fully initialized (in the
current implementation). It should not store origin. Initialized memory can't
have meaningful origin, and, due to origin granularity (4 bytes) there is a
chance that this extra store would overwrite meaningfull origin for an adjacent
location.

llvm-svn: 228444
2015-02-06 21:47:39 +00:00
Cameron Esfahani
788e741467 Test commit to see if it triggers an email to llvm-commits. No change.
llvm-svn: 228442
2015-02-06 21:33:08 +00:00
Zachary Turner
2bbea13594 Try to fix Makefile build for LLVMDebugInfoPDB.
llvm-svn: 228437
2015-02-06 20:42:03 +00:00
Zachary Turner
743a32b50f Resubmit "Create lib/DebugInfo/PDB" (r228428)
This change resubmits the patch that broke the build, this time
without unittests.  The unittests will be submitted separately
after the problem has been addressed:

--Original Commit Message--

Create lib/DebugInfo/PDB.

This patch creates a platform-independent interface to a PDB reader.
There is currently no implementation of this interface, which will
be provided in future patches.  This defines the basic object model
which any implementation must conform to.

Reviewed by: David Blaikie
Differential Revision: http://reviews.llvm.org/D7356

llvm-svn: 228435
2015-02-06 20:30:52 +00:00
Michael Zolotukhin
9630715912 Use estimated number of optimized insns in unroll-threshold computation.
If complete-unroll could help us to optimize away N% of instructions, we
might want to do this even if the final size would exceed loop-unroll
threshold. However, we don't want to unroll huge loop, and we are add
AbsoluteThreshold to avoid that - this threshold will never be crossed,
even if we expect to optimize 99% instructions after that.

llvm-svn: 228434
2015-02-06 20:20:40 +00:00
Michael Zolotukhin
bbf2ac3d22 [InstSimplify] Add SimplifyFPBinOp function.
It is a variation of SimplifyBinOp, but it takes into account
FastMathFlags.

It is needed in inliner and loop-unroller to accurately predict the
transformation's outcome (previously we dropped the flags and were too
conservative in some cases).

Example:
float foo(float *a, float b) {
 float r;
 if (a[1] * b)
   r = /* a lot of expensive computations */;
 else
   r = 1;
 return r;
}
float boo(float *a) {
 return foo(a, 0.0);
}

Without this patch, we don't inline 'foo' into 'boo'.

llvm-svn: 228432
2015-02-06 20:02:51 +00:00
Zachary Turner
434f023380 Revert "Create lib/DebugInfo/PDB."
This reverts commit 21028, as it is causing failures in LLVMConfig.

llvm-svn: 228431
2015-02-06 20:00:18 +00:00
Kostya Serebryany
afe59b6588 [fuzzer] move default sanitizer options to a separate file
llvm-svn: 228429
2015-02-06 19:52:07 +00:00
Zachary Turner
bfc7e60f16 Create lib/DebugInfo/PDB.
This patch creates a platform-independent interface to a PDB reader.
There is currently no implementation of this interface, which will
be provided in future patches.  This defines the basic object model
which any implementation must conform to.

Reviewed by: David Blaikie
Differential Revision: http://reviews.llvm.org/D7356

llvm-svn: 228428
2015-02-06 19:44:09 +00:00
Lang Hames
e1dab03508 [Orc] Move SectionMemoryManager's implementation from MCJIT to ExecutionEngine.
This is a more sensible home for SectionMemoryManager, and allows the implementation
to be shared between Orc and MCJIT.

llvm-svn: 228427
2015-02-06 19:36:40 +00:00
Lang Hames
af4f511096 [Orc] Add some missing headers.
llvm-svn: 228426
2015-02-06 19:34:40 +00:00
Lang Hames
fcb5b36695 [Orc] Fix syntax error in LazyEmittingLayer::removeModuleSet.
This was a trivial think-o, but it's in a method of a templated class
and doesn't have any callers yet, so the compiler let it pass. I hope
to add a unit test to cover this soon.

llvm-svn: 228425
2015-02-06 19:34:04 +00:00
Quentin Colombet
77dfe32eb3 [LiveIntervalAnalysis] Speed up creation of live ranges for physical registers
by using a segment set.

The patch addresses a compile-time performance regression in the LiveIntervals
analysis pass (see http://llvm.org/bugs/show_bug.cgi?id=18580). This regression
is especially critical when compiling long functions. Our analysis had shown
that the most of time is taken for generation of live intervals for physical
registers. Insertions in the middle of the array of live ranges cause quadratic
algorithmic complexity, which is apparently the main reason for the slow-down. 

Overview of changes:
- The patch introduces an additional std::set<Segment>* member in LiveRange for
  storing segments in the phase of initial creation. The set is used if this
  member is not NULL, otherwise everything works the old way. 
- The set of operations on LiveRange used during initial creation (i.e. used by
  createDeadDefs and extendToUses) have been reimplemented to use the segment
  set if it is available.
- After a live range is created the contents of the set are flushed to the
  segment vector, because the set is not as efficient as the vector for the
  later uses of the live range. After the flushing, the set is deleted and
  cannot be used again.
- The set is only for live ranges computed in
  LiveIntervalAnalysis::computeLiveInRegUnits() and getRegUnit() but not in
  computeVirtRegs(), because I did not bring any performance benefits to
  computeVirtRegs() and for some examples even brought a slow down.

Patch by Vaidas Gasiunas <vaidas.gasiunas@sap.com>

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

llvm-svn: 228421
2015-02-06 18:42:41 +00:00
Adam Nemet
2dda12d192 [LV] Move addRuntimeCheck to LoopAccessAnalysis
This will allow it to be shared with the new Loop Distribution pass.

getFirstInst is currently duplicated across LoopVectorize.cpp and
LoopAccessAnalysis.cpp.  This is a short-term work-around until we figure out
a better solution.

NFC.  (The code moved is adjusted a bit for the name of the Loop member and
that PtrRtCheck is now a reference rather than a pointer.)

llvm-svn: 228418
2015-02-06 18:31:04 +00:00
Reid Kleckner
fd6f58826f Don't dllexport declarations
Fixes PR22488

llvm-svn: 228411
2015-02-06 17:59:49 +00:00
Benjamin Kramer
db8b180786 Make helper functions/classes/globals static. NFC.
llvm-svn: 228410
2015-02-06 17:51:54 +00:00
Matthias Braun
7549566067 InstCombine: Combine select sequences into a single select
Normalize
select(C0, select(C1, a, b), b) -> select((C0 & C1), a, b)
select(C0, a, select(C1, a, b)) -> select((C0 | C1), a, b)

This normal form may enable further combines on the And/Or and shortens
paths for the values. Many targets prefer the other but can go back
easily in CodeGen.

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

llvm-svn: 228409
2015-02-06 17:49:36 +00:00
Matthias Braun
696b7644dd LiveInterval: Fix SubRange memory leak.
llvm-svn: 228405
2015-02-06 17:28:47 +00:00
Daniel Sanders
d8cb8e9931 [mips] Fix FileCheck prefixes with whitespace between 'CHECK' and ':'
llvm-svn: 228403
2015-02-06 16:37:30 +00:00
Benjamin Kramer
c44a1f1f54 Value: Remove superfluous typedefs and deprecated method. NFC.
llvm-svn: 228400
2015-02-06 14:44:02 +00:00
Benjamin Kramer
e6c6f3e775 AArch64PromoteConstant: Modernize and resolve some Use<->User confusion.
NFC.

llvm-svn: 228399
2015-02-06 14:43:55 +00:00
Benjamin Kramer
41edee969a IRCE: Demote template to ArrayRef and SmallVector to array.
NFC.

llvm-svn: 228398
2015-02-06 14:43:49 +00:00
Chad Rosier
35721f3b29 Whitespace.
llvm-svn: 228397
2015-02-06 14:14:41 +00:00
Rafael Espindola
afd3725ee6 Correcting keyword highlighting in llvm-mode.el.
llvm-mode was previously confused when variable names contained keywords.
This changes ensures that keywords are only highlighted when they're standalone.

Patch by Wilfred Hughes!

llvm-svn: 228396
2015-02-06 13:57:58 +00:00
Peter Zotov
33491f3d18 [OCaml] Add Llvm.build_empty_phi.
llvm-svn: 228395
2015-02-06 13:42:03 +00:00
Arnaud A. de Grandmaison
d21932e1f9 [PBQP] Fix comment wording. NFC
llvm-svn: 228390
2015-02-06 11:28:16 +00:00
Craig Topper
91342fb1a2 [X86] Add assembler and disassembler test cases for clflushopt, clwb, pcommit, xsaves, xrstors, xsavec
llvm-svn: 228385
2015-02-06 06:19:28 +00:00
Craig Topper
f7f267cf3e [X86] Remove a ton of duplicate test cases for the assembler.
llvm-svn: 228383
2015-02-06 05:50:50 +00:00
Michel Danzer
37206c74a0 R600/SI: Amend a test to ensure WQM is enabled for LDS in pixel shaders
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 228374
2015-02-06 02:51:29 +00:00
Michel Danzer
dd88eb8ebc R600/SI: Don't enable WQM for V_INTERP_* instructions v2
Doesn't seem necessary anymore. I think this was mostly compensating for
not enabling WQM for texture sampling instructions.

v2: Add test coverage
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 228373
2015-02-06 02:51:25 +00:00
Michel Danzer
5d9cb0f9f9 R600/SI: Also enable WQM for image opcodes which calculate LOD v3
If whole quad mode isn't enabled for these, the level of detail is
calculated incorrectly for pixels along diagonal triangle edges, causing
artifacts.

v2: Use a TSFlag instead of lots of switch cases
v3: Add test coverage

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88642
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 228372
2015-02-06 02:51:20 +00:00
Ramkumar Ramachandra
39bc517234 Introduce print-memderefs to test isDereferenceablePointer
Since testing the function indirectly is tricky, introduce a direct
print-memderefs pass, in the same spirit as print-memdeps, which prints
dereferenceability information matched by FileCheck.

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

llvm-svn: 228369
2015-02-06 01:46:42 +00:00
Matthias Braun
3baac7bffc AArch64: Make test more robust.
Avoid the creation of select instructions which can result in different
scheduling of the selects.

I also added a bunch of additional store volatiles. Those avoid A
CodeGen problem (bug?) where normalizes and denomarlizing the control
moves all shift instructions into the first block where ISel can't match
them together with the cmps.

llvm-svn: 228362
2015-02-05 23:52:14 +00:00
Matthias Braun
d7bdc2cc14 X86: Test cleanup
Use FileCheck, make it more consistent and do not rely on unoptimized
or(cmp,cmp) getting combined for max to be matched.

llvm-svn: 228361
2015-02-05 23:52:12 +00:00
Daniel Jasper
1040855bc8 Small cleanup of MachineLICM.cpp
Specifically:
- Calculate the loop pre-header once at the stat of HoistOutOfLoop, so:
  - We don't-DFS walk the MachineDomTree if we aren't going to do anything
  - Don't call getCurPreheader for each Scope
- Don't needlessly use a do-while loop
- Use early exit for Scopes.size() == 0

No functional changes intended.

llvm-svn: 228350
2015-02-05 22:39:46 +00:00
Colin LeMahieu
4a4a7fcd0d [Hexagon] Renaming v4 compare-and-jump instructions.
llvm-svn: 228349
2015-02-05 22:03:32 +00:00
Colin LeMahieu
76508657b3 [Hexagon] Deleting unused patterns.
llvm-svn: 228348
2015-02-05 21:43:56 +00:00
Colin LeMahieu
77a7515601 [Hexagon] Simplifying and formatting several patterns. Changing a pattern multiply to be expanded.
llvm-svn: 228347
2015-02-05 21:13:25 +00:00
Ahmed Bougacha
53c8a31ef4 [BasicAA] Add datalayouts to make some tests more useful. NFC.
Fixes PR22462: two of the tests have regressed for a while,
but were using CHECK-NOT to match "May:".  The actual output
was changed to "MayAlias:" at some point, which made the tests
useless.
Two others return MayAlias only because of a lack of analysis;
BasicAA returns PartialAlias in those cases, when a datalayout
is present.

llvm-svn: 228346
2015-02-05 21:10:14 +00:00
Colin LeMahieu
c801034ec8 [Hexagon] Factoring a class out of some store patterns, deleting unused definitions and reformatting some patterns.
llvm-svn: 228345
2015-02-05 20:38:58 +00:00
Colin LeMahieu
1b98c6df7b [Hexagon] Factoring out a class for immediate transfers and cleaning up formatting.
llvm-svn: 228343
2015-02-05 20:08:52 +00:00
Justin Bogner
0b39e02c0c InstrProf: Avoid using std::to_string
Apparently std::to_string doesn't exist in mingw32:

    http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/builds/7990
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015

llvm-svn: 228340
2015-02-05 19:54:27 +00:00
Alexey Samsonov
7bfd9fa108 [ASan] Enable -asan-stack-dynamic-alloca by default.
By default, store all local variables in dynamic alloca instead of
static one. It reduces the stack space usage in use-after-return mode
(dynamic alloca will not be called if the local variables are stored
in a fake stack), and improves the debug info quality for local
variables (they will not be described relatively to %rbp/%rsp, which
are assumed to be clobbered by function calls).

llvm-svn: 228336
2015-02-05 19:39:20 +00:00
Eric Christopher
9eafae8fce Remove the use of getSubtarget in the creation of the X86
PassManager instance. In one case we can make the determination
from the Triple, in the other (execution dependency pass) the
pass will avoid running if we don't have any code that uses that
register class so go ahead and add it to the pipeline.

llvm-svn: 228334
2015-02-05 19:27:04 +00:00
Eric Christopher
eccc225ea1 Use cached subtargets inside X86FixupLEAs.
llvm-svn: 228333
2015-02-05 19:27:01 +00:00
Eric Christopher
d7ba6f9e97 Migrate the X86 AsmPrinter away from using the subtarget when
dealing with module level emission. Currently this is using
the Triple to determine, but eventually the logic should
probably migrate to TLOF.

llvm-svn: 228332
2015-02-05 19:06:45 +00:00
Sylvestre Ledru
2724215440 Fix an incorrect identifier
Summary:
EIEIO is not a correct declaration and breaks the build under Debian HURD.
Instead, E_IEIO is used.

//
http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
Some additional classes of identifier names are reserved for future
extensions to the C language or the POSIX.1 environment. While using
these names for your own purposes right now might not cause a problem,
they do raise the possibility of conflict with future versions of the C
or POSIX standards, so you should avoid these names.
...
Names beginning with a capital ‘E’ followed a digit or uppercase letter
may be used for additional error code names. See Error Reporting.//

Reported here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776965
And patch wrote by Svante Signell 
With this patch, LLVM, Clang & LLDB build under Debian HURD:
https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.6&arch=hurd-i386&ver=1%3A3.6~%2Brc2-2&stamp=1423040039

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: llvm-commits

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

llvm-svn: 228331
2015-02-05 18:57:02 +00:00
Colin LeMahieu
3ca6d76c86 [Hexagon] Renaming Y2_barrier. Fixing issues where doubleword variants of instructions can't be newvalue producers.
llvm-svn: 228330
2015-02-05 18:56:28 +00:00
Hal Finkel
9eda05dc76 [PowerPC] Prepare loops for pre-increment loads/stores
PowerPC supports pre-increment load/store instructions (except for Altivec/VSX
vector load/stores). Using these on embedded cores can be very important, but
most loops are not naturally set up to use them. We can often change that,
however, by placing loops into a non-canonical form. Generically, this means
transforming loops like this:

  for (int i = 0; i < n; ++i)
    array[i] = c;

to look like this:

  T *p = array[-1];
  for (int i = 0; i < n; ++i)
    *++p = c;

the key point is that addresses accessed are pulled into dedicated PHIs and
"pre-decremented" in the loop preheader. This allows the use of pre-increment
load/store instructions without loop peeling.

A target-specific late IR-level pass (running post-LSR), PPCLoopPreIncPrep, is
introduced to perform this transformation. I've used this code out-of-tree for
generating code for the PPC A2 for over a year. Somewhat to my surprise,
running the test suite + externals on a P7 with this transformation enabled
showed no performance regressions, and one speedup:

External/SPEC/CINT2006/483.xalancbmk/483.xalancbmk
	-2.32514% +/- 1.03736%

So I'm going to enable it on everything for now. I was surprised by this
because, on the POWER cores, these pre-increment load/store instructions are
cracked (and, thus, harder to schedule effectively). But seeing no regressions,
and feeling that it is generally easier to split instructions apart late than
it is to combine them late, this might be the better approach regardless.

In the future, we might want to integrate this functionality into LSR (but
currently LSR does not create new PHI nodes, so (for that and other reasons)
significant work would need to be done).

llvm-svn: 228328
2015-02-05 18:43:00 +00:00