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

132134 Commits

Author SHA1 Message Date
Matt Arsenault
c4ee204f5c AMDGPU: Define priorities for register classes
Allocating larger register classes first should give better allocation
results (and more importantly for myself, make the lit tests more stable
with respect to scheduler changes).

Patch by Matthias Braun

llvm-svn: 270312
2016-05-21 03:55:07 +00:00
Craig Topper
2b54c30436 [AVX512] Disable AVX/AVX2 patterns for VPSADBW and VPMULUDQ when the AVX512VL/AVX512BWI equivalents are available.
llvm-svn: 270311
2016-05-21 03:52:32 +00:00
Craig Topper
8ca6c23ba5 [X86] Convert some SSE2/AVX2 intrinsics to ISD opcodes during lowering instead of pattern matching the intrinsics. This unifies handling with AVX512 and allows these intrinsics to select EVEX encoded instructions to increase available registers.
llvm-svn: 270310
2016-05-21 03:52:28 +00:00
Sanjoy Das
472411c719 [IRCE] Don't use an allocator for range checks; NFC
The InductiveRangeCheck struct is only five words long; so passing these
around value is fine.  The allocator makes the code look more complex
than it is.

llvm-svn: 270309
2016-05-21 02:52:13 +00:00
Sanjoy Das
2e4b716313 [IRCE] Don't pass IRBuilder<> where unnecessary; NFC
llvm-svn: 270308
2016-05-21 02:31:51 +00:00
Matt Arsenault
1eaf7c8b10 AMDGPU: Cleanup lowering actions
These are kind of a mess and hard to follow, particularly
for loads and stores. Fix various redundant, unnecessary
and dead settings.

llvm-svn: 270307
2016-05-21 02:27:49 +00:00
Sanjoy Das
9b7c91f0ad [GuardWidening] Fix incorrect use of remove_if
I had used `std::remove_if` under the assumption that it moves the
predicate matching elements to the end, but actaully the elements
remaining towards the end (after the iterator returned by
`std::remove_if`) are indeterminate.  Fix the bug (and make the code
more straightforward) by using a temporary SmallVector, and add a test
case demonstrating the issue.

llvm-svn: 270306
2016-05-21 02:24:44 +00:00
Matt Arsenault
44230570f6 AMDGPU: Fix high bits after division optimization
This is essentially doing a 24-bit signed division with FP.
We need to truncate to the N bit result.

llvm-svn: 270305
2016-05-21 01:53:33 +00:00
Quentin Colombet
9b5e08fa9b [RegBankSelect] Compute the repairing cost for copies.
Prior to this patch, we were using 1 for all the repairing costs.
Now, we use the information from the target to get this information.

llvm-svn: 270304
2016-05-21 01:43:25 +00:00
Quentin Colombet
a48386a2aa [RegisterBankInfo] Fix the initialization of the map VT to RegBank.
Prior to this patch we could have read uninitialized memory.

llvm-svn: 270303
2016-05-21 01:41:17 +00:00
Dylan McKay
d7d0f71629 [AVR] Add AVRMCAsmInfo
llvm-svn: 270302
2016-05-21 01:06:37 +00:00
Matt Arsenault
06895e862f AMDGPU: Fix verifier error when spilling SGPRs
The current SGPR spilling test does not stress this
because it is using s_buffer_load instructions to
increase SGPR pressure and spill, but their output
operands have the same SReg_32_XM0 constraint. This fixes
an error when the SReg_32 output from most instructions
is spilled.

llvm-svn: 270301
2016-05-21 00:53:42 +00:00
Matt Arsenault
4805dff2a5 AMDGPU: Fix relationship between SReg_32 and SReg_32_XM0
llvm-svn: 270300
2016-05-21 00:53:28 +00:00
Chris Bieneman
b1a11d081e Fix implicit type conversion. NFC.
llvm-svn: 270299
2016-05-21 00:36:47 +00:00
Dylan McKay
17a442f81e [AVR] Fix header files in MCTargetDesc
Everything now compiles successfully, but there are still undefined
references.

llvm-svn: 270298
2016-05-21 00:35:07 +00:00
Matt Arsenault
c34a7d2258 AMDGPU: Handle cbranch vccz/vccnz
llvm-svn: 270297
2016-05-21 00:29:40 +00:00
Matt Arsenault
5438a4669d AMDGPU: Implement ReverseBranchCondition
llvm-svn: 270296
2016-05-21 00:29:34 +00:00
Matt Arsenault
a197a65904 AMDGPU: Implement AnalyzeBranch
Original patch by Tom Stellard

llvm-svn: 270295
2016-05-21 00:29:27 +00:00
Dan Gohman
920c7d7490 [WebAssembly] Optimize away return instructions using fallthroughs.
This saves a small amount of code size, and is a first small step toward
passing values on the stack across block boundaries.

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

llvm-svn: 270294
2016-05-21 00:21:56 +00:00
Matt Arsenault
042c06f5a2 Fix constant folding of addrspacecast of null
This should not be making assumptions on the value of
the casted pointer.

llvm-svn: 270293
2016-05-21 00:14:04 +00:00
Dylan McKay
1126d23533 [AVR] Fix signuature of AVRTargetMachine constructor
llvm-svn: 270292
2016-05-20 23:39:04 +00:00
Matthias Braun
13037577f3 LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()
We now use LiveRangeCalc::extendToUses() instead of a specially designed
algorithm in constructMainRangeFromSubranges():
- The original motivation for constructMainRangeFromSubranges() were
  differences between the main liverange and subranges because of hidden
  dead definitions. This case however cannot happen anymore with the
  DetectDeadLaneMasks pass in place.
- It simplifies the code.
- This fixes a longstanding bug where we did not properly create new SSA
  values on merging control flow (the MachineVerifier missed most of
  these cases).
- Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and
  LiveRangeCalc to better match the implementation/available helper
  functions.

This re-applies r269016. The fixes from r270290 and r270259 should avoid
the machine verifier problems this time.

llvm-svn: 270291
2016-05-20 23:14:56 +00:00
Matthias Braun
327a7f0867 MachineVerifier: subregs so not require defs/valnos on every path
It is fine for subregister ranges to be undefined on some CFG paths as
we may have a "vregX:other_subreg<read-undef> =" def on that path. We
do not (and should not) have live segments for the subregister ranges.
The MachineVerifier should not complain about this.

This is a slight variant of http://llvm.org/PR27705

llvm-svn: 270290
2016-05-20 23:02:13 +00:00
Rui Ueyama
7c39439956 Fix struct member names and simplify. NFC.
llvm-svn: 270289
2016-05-20 22:59:05 +00:00
Tim Shen
a4d5b2aaf2 [PowerPC] Add a testcase for TCO on string rvo function
Differential Revision: http://reviews.llvm.org/D20311

llvm-svn: 270287
2016-05-20 22:42:01 +00:00
Chris Bieneman
c0ccb88987 [yaml2obj] [MachO] Fill Segment and Section data
This fills section data with 0xDEADBEEF and segment data not inside a section with 0xBAADDA7A. This results in yaml2obj generating a matching size object file. Any additional bytes in the file are zero'd.

This is a starting point for populating the remaining segment data, and provides a hex viewable file that you can easily see the missing data in.

llvm-svn: 270286
2016-05-20 22:31:50 +00:00
Sanjay Patel
df2ee08706 add test vector sdiv
llvm-svn: 270285
2016-05-20 22:08:40 +00:00
Sanjay Patel
38c18fba6e add test for vector shift
llvm-svn: 270284
2016-05-20 22:08:16 +00:00
Justin Bogner
20645f2085 SDAG: Implement Select instead of SelectImpl in PPCDAGToDAGISel
- Where we were returning a node before, call ReplaceNode instead.
- Where we would return null to fall back to another selector, rename
  the method to try* and return a bool for success.
- Where we were calling SelectNodeTo, just return afterwards.

Part of llvm.org/pr26808.

llvm-svn: 270283
2016-05-20 21:43:23 +00:00
Jacques Pienaar
4813cd5255 [lanai] Change reloc to use PIC_ by default and cleanup.
* Change reloc to PIC_;
* Cleanup (clang-format & modify test);

llvm-svn: 270282
2016-05-20 21:41:53 +00:00
Richard Smith
89657034a8 Switch from the linux-specific 'struct sigaltstack' to POSIX's 'stack_t'. This
is what I get for trusting my system's man pages I suppose.

llvm-svn: 270280
2016-05-20 21:38:15 +00:00
Richard Smith
74e8540951 Add a configure-time check for the existence of sigaltstack. It seems that some
systems provide a <signal.h> that doesn't declare it.

llvm-svn: 270278
2016-05-20 21:26:00 +00:00
Richard Smith
d86d870067 Reinstate r269992 (reverting r270267), but restricted to cases where glibc is
the C standard library implementation in use.

This works around a glibc bug in the backtrace() function where it fails to
produce a backtrace on x86_64 if libgcc / libunwind is statically linked.

llvm-svn: 270276
2016-05-20 21:18:12 +00:00
Richard Smith
1ae48ee8c8 Create a sigaltstack when we register our signal handlers. Otherwise we'd very
likely fail to produce a backtrace if we crash due to stack overflow.

llvm-svn: 270273
2016-05-20 21:07:41 +00:00
Michael Kuperstein
6f2a00d639 Revert r270268 due to unused variable warnings.
llvm-svn: 270272
2016-05-20 20:55:51 +00:00
Sanjay Patel
156965ba77 add tests for vector urem
llvm-svn: 270271
2016-05-20 20:55:17 +00:00
David Majnemer
08b442df36 Address post-review for r270246
This gets rid of some unnecessary SmallStrings in
X86TargetMachine::getSubtargetImpl.

No functionality change is intended.

llvm-svn: 270270
2016-05-20 20:41:24 +00:00
Adrian Prantl
b0eca4f464 dsymutil/modules: Reword the warning for static libraries without module caches
In addition to clarifying the warning message this contains a minor functional
change in that it now warns if the *immediate* parent directory in which the
missing PCM is expected to be isn't found.

This patch also includes a more comprehensive testcase.

rdar://problem/25860711

llvm-svn: 270269
2016-05-20 20:36:06 +00:00
Michael Kuperstein
04ae34d985 [BasicAA] Turn DecomposeGEPExpression runtime checks into asserts.
When it has a DataLayout, DecomposeGEPExpression() should return the same object
as GetUnderlyingObject(). Per the FIXME, it currently always has a DL, so the
runtime check is redundant and can become an assert.

llvm-svn: 270268
2016-05-20 20:26:50 +00:00
Chris Bieneman
681d988432 Revert "Work around a glibc bug: backtrace() spuriously fails if..."
This commit has been breaking the FreeBSD bots:
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd

This reverts commit r269992.

llvm-svn: 270267
2016-05-20 20:15:17 +00:00
Sanjay Patel
f536e5debc use FileCheck instead of grep for exact checking
llvm-svn: 270265
2016-05-20 20:07:18 +00:00
Derek Bruening
3d9ccfeab7 [esan] Use ModulePass for EfficiencySanitizerPass.
Summary:
Uses ModulePass instead of FunctionPass for EfficiencySanitizerPass to
better support global variable creation for a forthcoming struct field
counter tool.

Patch by Qin Zhao.

Reviewers: aizatsky

Subscribers: llvm-commits, eugenis, vitalybuka, bruening, kcc

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

llvm-svn: 270263
2016-05-20 20:00:05 +00:00
Rui Ueyama
6e6f949eb0 pdbdump: print out symbol names referred by publics stream.
DBI stream contains a stream number of the symbol record stream.
Symbol record streams is an array of length-type-value members.
Each member represents one symbol.

Publics stream contains offsets to the symbol record stream.
This patch is to print out all symbols that are referenced by
the publics stream.

Note that even with this patch, llvm-pdbdump cannot dump all the
information in a publics stream since it contains more information
than symbol names. I'll improve it in followup patches.

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

llvm-svn: 270262
2016-05-20 19:55:17 +00:00
Krzysztof Parzyszek
5b8abb9534 Use report_fatal_error after all
Depending on the compiler used to build LLVM, llvm_unreachable can either
expand to a call to abort(), or to a __builtin_unreachable. The latter
does not have a predictable behavior at runtime.

llvm-svn: 270260
2016-05-20 19:46:42 +00:00
Matthias Braun
03d346febe LiveIntervalAnalysis: Fix missing defs in renameDisconnectedComponents().
Fix renameDisconnectedComponents() creating vreg uses that can be
reached from function begin withouthaving a definition (or explicit
live-in). Fix this by inserting IMPLICIT_DEF instruction before
control-flow joins as necessary.

Removes an assert from MachineScheduler because we may now get
additional IMPLICIT_DEF when preparing the scheduling policy.

This fixes the underlying problem of http://llvm.org/PR27705

llvm-svn: 270259
2016-05-20 19:46:13 +00:00
Peter Collingbourne
2e1acaa19d CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor.
This gives AsmPrinter a chance to initialize its DD field before
we call beginModule(), which is about to start using it.

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

llvm-svn: 270258
2016-05-20 19:35:35 +00:00
Peter Collingbourne
162aaa4e2a CodeGen: Do not require a MachineFunction just to create a DIEDwarfExpression.
We are about to start using DIEDwarfExpression to create global variable
DIEs, which happens before we generate code for functions.

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

llvm-svn: 270257
2016-05-20 19:35:17 +00:00
Justin Bogner
ff22caedd8 CODE_OWNERS: Take ownership of SelectionDAG
Owen no longer has time to tend to the yaks in SelectionDAG.

llvm-svn: 270253
2016-05-20 19:14:04 +00:00
Jun Bum Lim
3a259859b7 [AArch64] Disable narrow load merge by default
Summary:
As this optimization converts two loads into one load with two shift instructions,
it could potentially hurt performance if a loop is arithmetic operation intensive.

Reviewers: t.p.northover, mcrosier, jmolloy

Subscribers: evandro, jmolloy, aemerson, rengolin, mcrosier, llvm-commits

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

llvm-svn: 270251
2016-05-20 18:45:49 +00:00
Mark Lacey
15fb815be7 Functions with differing phis should not be merged.
Check that the incoming blocks of phi nodes are identical, and block
function merging if they are not.

rdar://problem/26255167

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

llvm-svn: 270250
2016-05-20 18:39:11 +00:00