lldb.git
6 years ago[SPARC] Fix 8 and 16-bit atomic load and store.
James Y Knight [Mon, 23 May 2016 20:33:00 +0000 (20:33 +0000)]
[SPARC] Fix 8 and 16-bit atomic load and store.

They were accidentally using the 32-bit load/store instruction for
8/16-bit operations, due to incorrect patterns

(8/16-bit cmpxchg and atomicrmw will be fixed in subsequent changes)

llvm-svn: 270486

6 years agoModify emitTypeInformation to use MemoryTypeTableBuilder, take 2
Reid Kleckner [Mon, 23 May 2016 20:23:46 +0000 (20:23 +0000)]
Modify emitTypeInformation to use MemoryTypeTableBuilder, take 2

This effectively revers commit r270389 and re-lands r270106, but it's
almost a rewrite.

The behavior change in r270106 was that we could no longer assume that
each LF_FUNC_ID record got its own type index. This patch adds a map
from DINode* to TypeIndex, so we can stop making that assumption.

This change also emits padding bytes between type records similar to the
way MSVC does. The size of the type record includes the padding bytes.

llvm-svn: 270485

6 years ago[CUDA] Add -fcuda-approx-transcendentals flag.
Justin Lebar [Mon, 23 May 2016 20:19:56 +0000 (20:19 +0000)]
[CUDA] Add -fcuda-approx-transcendentals flag.

Summary:
This lets us emit e.g. sin.approx.f32.  See
http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin

Reviewers: rnk

Subscribers: tra, cfe-commits

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

llvm-svn: 270484

6 years ago[profile] clean up runtime warnings.
Xinliang David Li [Mon, 23 May 2016 20:08:58 +0000 (20:08 +0000)]
[profile] clean up runtime warnings.

 o make warning message more meaningful to users.
 o add suggestion to fix the problem
 o limit the max number of output.

llvm-svn: 270483

6 years agoFix filtering of prior declarations when checking for a tag redeclaration to
Richard Smith [Mon, 23 May 2016 20:03:04 +0000 (20:03 +0000)]
Fix filtering of prior declarations when checking for a tag redeclaration to
map to the redecl context for both decls, not just one of them, and to properly
check that the decl contexts are equivalent.

llvm-svn: 270482

6 years agoInsertPointAnalysis: Move current live interval from being a class member
Wei Mi [Mon, 23 May 2016 19:39:19 +0000 (19:39 +0000)]
InsertPointAnalysis: Move current live interval from being a class member
to query interfaces argument; NFC

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

llvm-svn: 270481

6 years agotune lowering parameter for small apps (sjeng)
Xinliang David Li [Mon, 23 May 2016 19:29:26 +0000 (19:29 +0000)]
tune lowering parameter for small apps (sjeng)

llvm-svn: 270480

6 years ago[InstCombine] Fix assertion when bitcast is converted to gep
Gerolf Hoflehner [Mon, 23 May 2016 19:23:17 +0000 (19:23 +0000)]
[InstCombine] Fix assertion when bitcast is converted to gep

When an aggregate contains an opaque type its size cannot be
determined. This triggers an "Invalid GetElementPtrInst indices for type" assert
in function checkGEPType. The fix suppresses the conversion in this case.

http://reviews.llvm.org/D20319

llvm-svn: 270479

6 years ago[LoopUnroll] Enable advanced unrolling analysis by default.
Michael Zolotukhin [Mon, 23 May 2016 19:10:19 +0000 (19:10 +0000)]
[LoopUnroll] Enable advanced unrolling analysis by default.

Summary:
This patch turns on LoopUnrollAnalyzer by default. To mitigate compile
time regressions, I chose very conservative thresholds for now. Later we
can make them more aggressive, but it might require being smarter in
which loops we're optimizing. E.g. currently the biggest issue is that
with more agressive thresholds we unroll many cold loops, which
increases compile time for no performance benefit (performance of those
loops is improved, but it doesn't matter since they are cold).

Test results for compile time(using 4 samples to reduce noise):
```
MultiSource/Benchmarks/VersaBench/ecbdes/ecbdes 5.19%
SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect  4.19%
MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow  3.39%
MultiSource/Applications/JM/lencod/lencod 1.47%
MultiSource/Benchmarks/Fhourstones-3_1/fhourstones3_1 -6.06%
```

I didn't see any performance changes in the testsuite, but it improves
some internal tests.

Reviewers: hfinkel, chandlerc

Subscribers: llvm-commits, mzolotukhin

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

llvm-svn: 270478

6 years agoFix DEBUG logs in MachineLICM.
Justin Lebar [Mon, 23 May 2016 18:56:07 +0000 (18:56 +0000)]
Fix DEBUG logs in MachineLICM.

Summary:
MBBs don't necessarily have a name (in my experience, they almost never
do), in which case this logging is quite unhelpful.  The number seems to
work well.

Reviewers: iteratee

Subscribers: llvm-commits

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

llvm-svn: 270477

6 years agoadd cmake files to Xcode project
Todd Fiala [Mon, 23 May 2016 18:56:05 +0000 (18:56 +0000)]
add cmake files to Xcode project

This makes it easier to use Xcode revision diffing tools on them.

llvm-svn: 270476

6 years ago[codeview] Refactor symbol records to use same pattern as types.
Zachary Turner [Mon, 23 May 2016 18:49:06 +0000 (18:49 +0000)]
[codeview] Refactor symbol records to use same pattern as types.

This will pave the way to introduce a full fledged symbol visitor
similar to how we have a type visitor, thus allowing the same
dumping code to be used in llvm-readobj and llvm-pdbdump.

Differential Revision: http://reviews.llvm.org/D20384
Reviewed By: rnk

llvm-svn: 270475

6 years agoRemoved the m_decl_objects map from ClangASTContext.
Sean Callanan [Mon, 23 May 2016 18:30:59 +0000 (18:30 +0000)]
Removed the m_decl_objects map from ClangASTContext.

m_decl_objects is problematic because it assumes that each VarDecl has a unique
variable associated with it.  This is not the case in inline contexts.

Also the information in this map can be reconstructed very easily without
maintaining the map.  The rest of the testsuite passes with this cange, and I've
added a testcase covering the inline contexts affected by this.

<rdar://problem/26278502>

llvm-svn: 270474

6 years agoCommiting for http://reviews.llvm.org/D20365
Mads Ravn [Mon, 23 May 2016 18:27:05 +0000 (18:27 +0000)]
Commiting for http://reviews.llvm.org/D20365

llvm-svn: 270473

6 years agoCommiting for http://reviews.llvm.org/D20365
Mads Ravn [Mon, 23 May 2016 18:15:40 +0000 (18:15 +0000)]
Commiting for http://reviews.llvm.org/D20365

llvm-svn: 270472

6 years agoRemove dead code.
Rui Ueyama [Mon, 23 May 2016 18:08:27 +0000 (18:08 +0000)]
Remove dead code.

The dead declarations made MSVC to warn on explicit template
instantiations of the classes.

llvm-svn: 270471

6 years agoCommiting for http://reviews.llvm.org/D20365
Mads Ravn [Mon, 23 May 2016 18:06:29 +0000 (18:06 +0000)]
Commiting for http://reviews.llvm.org/D20365

llvm-svn: 270470

6 years agofix typo; NFC
Sanjay Patel [Mon, 23 May 2016 18:01:20 +0000 (18:01 +0000)]
fix typo; NFC

llvm-svn: 270469

6 years agoFork performance improvements
Jonathan Peyton [Mon, 23 May 2016 18:01:19 +0000 (18:01 +0000)]
Fork performance improvements

Most of this is modifications to check for differences before updating data
fields in team struct. There is also some rearrangement of the team struct.

Patch by Diego Caballero

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

llvm-svn: 270468

6 years agouse range-loop; NFCI
Sanjay Patel [Mon, 23 May 2016 18:00:50 +0000 (18:00 +0000)]
use range-loop; NFCI

llvm-svn: 270467

6 years agollvm-dwp: More error handling around invalid compressed sections
David Blaikie [Mon, 23 May 2016 17:59:17 +0000 (17:59 +0000)]
llvm-dwp: More error handling around invalid compressed sections

llvm-svn: 270466

6 years agofix formatting; NFC
Sanjay Patel [Mon, 23 May 2016 17:57:54 +0000 (17:57 +0000)]
fix formatting; NFC

llvm-svn: 270465

6 years agoAllow unit testing on Windows
Jonathan Peyton [Mon, 23 May 2016 17:50:32 +0000 (17:50 +0000)]
Allow unit testing on Windows

These changes allow testing on Windows using clang.exe.
There are two main changes:
1. Only link to -lm when it actually exists on the system
2. Create basic versions of pthread_create() and pthread_join() for windows.
   They are not POSIX compliant by any stretch but will allow any existing
   and future tests to use pthread_create() and pthread_join() for testing
   interactions of libomp with os threads.

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

llvm-svn: 270464

6 years ago[WebAssembly] Speed up LiveIntervals updating.
Dan Gohman [Mon, 23 May 2016 17:42:57 +0000 (17:42 +0000)]
[WebAssembly] Speed up LiveIntervals updating.

Use the more specific LiveInterval::removeSegment instead of
LiveInterval::shrinkToUses when we know the specific range that's
being removed.

llvm-svn: 270463

6 years agollvm-dwp: Ensure compressed sections are preserved long enough for use in the string...
David Blaikie [Mon, 23 May 2016 17:35:51 +0000 (17:35 +0000)]
llvm-dwp: Ensure compressed sections are preserved long enough for use in the string pool

Now that the string pool is referential rather than maintaining its own
copy of string data, compressed sections (well, technically only the
debug_str section*) need to be preserved for the lifetime of the pool to
match.

* I'm not currently optimizing for memory footprint with compressed
  input - the major memory limit I'm hitting is on dwp+dwp merge steps
  and we aren't currently compressing contents in dwp files, just in the
  .dwo inputs.

llvm-svn: 270462

6 years agoAddress post-commit review feedback to r270457
David Majnemer [Mon, 23 May 2016 17:32:35 +0000 (17:32 +0000)]
Address post-commit review feedback to r270457

Add two tests which show our error handling behavior for invalid
parameters in the layout_version and empty_bases attributes.

Amend our documentation to make it more clear that
__declspec(empty_bases) and __declspec(layout_version) can only apply to
classes, structs, and unions.

llvm-svn: 270461

6 years agoAlways rerun all tests on Windows.
Zachary Turner [Mon, 23 May 2016 17:32:04 +0000 (17:32 +0000)]
Always rerun all tests on Windows.

There is flakiness somewhere in the core infrastructure on Windows,
so to get the buildbot reliably green we need to mark all tests
as flaky.

llvm-svn: 270460

6 years ago[Hexagon] Move some debug-only variable declarations into DEBUG
Krzysztof Parzyszek [Mon, 23 May 2016 17:31:30 +0000 (17:31 +0000)]
[Hexagon] Move some debug-only variable declarations into DEBUG

llvm-svn: 270459

6 years agoClang support for __is_assignable intrinsic
David Majnemer [Mon, 23 May 2016 17:21:55 +0000 (17:21 +0000)]
Clang support for __is_assignable intrinsic

MSVC now supports the __is_assignable type trait intrinsic,
to enable easier and more efficient implementation of the
Standard Library's is_assignable trait.
As of Visual Studio 2015 Update 3, the VC Standard Library
implementation uses the new intrinsic unconditionally.

The implementation is pretty straightforward due to the previously
existing is_nothrow_assignable and is_trivially_assignable.
We handle __is_assignable via the same code as the other two except
that we skip the extra checks for nothrow or triviality.

Patch by Dave Bartolomeo!

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

llvm-svn: 270458

6 years ago[MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version)
David Majnemer [Mon, 23 May 2016 17:16:12 +0000 (17:16 +0000)]
[MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version)

The layout_version attribute is pretty straightforward: use the layout
rules from version XYZ of MSVC when used like
struct __declspec(layout_version(XYZ)) S {};

The empty_bases attribute is more interesting.  It tries to get the C++
empty base optimization to fire more often by tweaking the MSVC ABI
rules in subtle ways:
1. Disable the leading and trailing zero-sized object flags if a class
   is marked __declspec(empty_bases) and is empty.

   This means that given:
   struct __declspec(empty_bases) A {};
   struct __declspec(empty_bases) B {};
   struct C : A, B {};

   'C' will have size 1 and nvsize 0 despite not being annotated
   __declspec(empty_bases).

2. When laying out virtual or non-virtual bases, disable the injection
   of padding between classes if the most derived class is marked
   __declspec(empty_bases).

   This means that given:
   struct A {};
   struct B {};
   struct __declspec(empty_bases) C : A, B {};

   'C' will have size 1 and nvsize 0.

3. When calculating the offset of a non-virtual base, choose offset zero
   if the most derived class is marked __declspec(empty_bases) and the
   base is empty _and_ has an nvsize of 0.

   Because of the ABI rules, this does not mean that empty bases
   reliably get placed at offset 0!

   For example:
   struct A {};
   struct B {};
   struct __declspec(empty_bases) C : A, B { virtual ~C(); };

   'C' will be pointer sized to account for the vfptr at offset 0.
   'A' and 'B' will _not_ be at offset 0 despite being empty!
   Instead, they will be located right after the vfptr.

   This occurs due to the interaction betweeen non-virtual base layout
   and virtual function pointer injection: injection occurs after the
   nv-bases and shifts them down by the size of a pointer.

llvm-svn: 270457

6 years agoSBValue::CreateValueFromData didn’t check whether the SBType passed into it is in...
Enrico Granata [Mon, 23 May 2016 17:11:14 +0000 (17:11 +0000)]
SBValue::CreateValueFromData didn’t check whether the SBType passed into it is in fact a valid type - this can lead to LLDB crashing upon access

Committing on behalf of Sebastian Theophil

llvm-svn: 270456

6 years agoDo not split mergeable sections if they are gc'ed.
Rui Ueyama [Mon, 23 May 2016 16:55:43 +0000 (16:55 +0000)]
Do not split mergeable sections if they are gc'ed.

Previously, mergeable section's constructors did more than just
setting member variables; it split section contents into small
pieces. It is not always computationally cheap task because if
the section is a mergeable string section, it needs to scan the
entire section to split them by NUL characters.

If a section would be thrown away by GC, that cost ended up
being a waste of time. It is going to be larger problem if the
section is compressed -- the whole time to uncompress it and
split it up is going to be a waste.

Luckily, we can defer section splitting after GC. We just have
to remember which offsets are in use during GC and apply that later.
This patch implements it.

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

llvm-svn: 270455

6 years agoSDAG: Remove the transitional default Select() implementation
Justin Bogner [Mon, 23 May 2016 16:52:53 +0000 (16:52 +0000)]
SDAG: Remove the transitional default Select() implementation

In r268693, we started requiring that SelectionDAGISel::Select return
void, but provided a default implementation that did just that by
calling into the old interface. Now that all targets have been
updated, we'll just remove the default implementation.

llvm-svn: 270454

6 years agollvm-dwp: Fix the build by moving DWPStringPool into the llvm namespace
David Blaikie [Mon, 23 May 2016 16:45:00 +0000 (16:45 +0000)]
llvm-dwp: Fix the build by moving DWPStringPool into the llvm namespace

llvm-svn: 270453

6 years agoExtract renaming from D19181
Amaury Sechet [Mon, 23 May 2016 16:38:25 +0000 (16:38 +0000)]
Extract renaming from D19181

Summary: This needs to get in before anything is released concerning attribute. If the old name gets in the wild, then we are stuck with it forever. Putting it in its own diff should getting that part at least in fast.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight

Subscribers: llvm-commits, joker.eph

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

llvm-svn: 270452

6 years agoFix typos.
Rui Ueyama [Mon, 23 May 2016 16:36:47 +0000 (16:36 +0000)]
Fix typos.

llvm-svn: 270451

6 years ago[profile] show more statistics
Xinliang David Li [Mon, 23 May 2016 16:36:11 +0000 (16:36 +0000)]
[profile] show more statistics

Add value profile statistics with the 'show' command.

llvm-svn: 270450

6 years agollvm-dwp: Add an abstraction for the DWP string pool
David Blaikie [Mon, 23 May 2016 16:32:11 +0000 (16:32 +0000)]
llvm-dwp: Add an abstraction for the DWP string pool

Also reference strings in the memory mapped file, reduces memory usage
on a large test case by 18.5%.

llvm-svn: 270449

6 years agoRemove EhFrameHeader<ELFT>::reserveFde. NFC.
Rui Ueyama [Mon, 23 May 2016 16:30:41 +0000 (16:30 +0000)]
Remove EhFrameHeader<ELFT>::reserveFde. NFC.

llvm-svn: 270448

6 years agoChanged parameter names in Fortran modules to correspond with OpenMP 4.5 specification
Jonathan Peyton [Mon, 23 May 2016 16:24:39 +0000 (16:24 +0000)]
Changed parameter names in Fortran modules to correspond with OpenMP 4.5 specification

llvm-svn: 270447

6 years agoRemove dead code.
Rui Ueyama [Mon, 23 May 2016 16:24:22 +0000 (16:24 +0000)]
Remove dead code.

Since now we always set SHT_PROGBITS to .eh_frame sections,
this code path is not executed at runtime.

llvm-svn: 270446

6 years agoMake .eh_frame a singleton output object.
Rui Ueyama [Mon, 23 May 2016 16:24:16 +0000 (16:24 +0000)]
Make .eh_frame a singleton output object.

.eh_frame_hdr assumes that there is only one .eh_frame and
ensures it by assertions. This patch makes .eh_frame a real
singleton object to simplify.

llvm-svn: 270445

6 years agoRemoving a switch statement that contains only a default label; NFC.
Aaron Ballman [Mon, 23 May 2016 15:52:59 +0000 (15:52 +0000)]
Removing a switch statement that contains only a default label; NFC.

llvm-svn: 270444

6 years agoDo not propagate section name and attributes to .eh_frame.
Rui Ueyama [Mon, 23 May 2016 15:12:41 +0000 (15:12 +0000)]
Do not propagate section name and attributes to .eh_frame.

.eh_frame is always ".eh_frame" and its attribute is fixed.
No need to copy from inputs to outputs. GNU gold also sets
SHT_PROGBITS.

llvm-svn: 270443

6 years agoRename EHOutputSection -> EhOutputSection for consistency.
Rui Ueyama [Mon, 23 May 2016 15:07:59 +0000 (15:07 +0000)]
Rename EHOutputSection -> EhOutputSection for consistency.

llvm-svn: 270442

6 years ago[clang][AVX512][Builtin] adding missing intrinsics for vpmultishiftqb{128|256|512...
Michael Zuckerman [Mon, 23 May 2016 15:04:39 +0000 (15:04 +0000)]
[clang][AVX512][Builtin] adding missing intrinsics for vpmultishiftqb{128|256|512} instruction set .

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

llvm-svn: 270441

6 years ago[BPF] Remove exit-on-error flag in test (PR27766)
Diana Picus [Mon, 23 May 2016 14:57:19 +0000 (14:57 +0000)]
[BPF] Remove exit-on-error flag in test (PR27766)

The exit-on-error flag on the many_args1.ll test is needed to avoid an
unreachable in BPFTargetLowering::LowerCall. We can also avoid it by ignoring
any superfluous arguments to the call (i.e. any arguments after the first 5).

Fixes PR27766.

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

v2 of r270419

llvm-svn: 270440

6 years ago[ScopInfo] Remove unused typedef OutgoingValueMapTy. NFC.
Michael Kruse [Mon, 23 May 2016 14:51:52 +0000 (14:51 +0000)]
[ScopInfo] Remove unused typedef OutgoingValueMapTy. NFC.

llvm-svn: 270439

6 years ago[ScopInfo] Change removeMemoryAccesses to remove only one access. NFC.
Michael Kruse [Mon, 23 May 2016 14:45:58 +0000 (14:45 +0000)]
[ScopInfo] Change removeMemoryAccesses to remove only one access. NFC.

This exposes the more basic operation for use by code not related to
invariant code hoisting.

llvm-svn: 270438

6 years ago[X86][RTM] _xabort() should not have "noreturn" attribute
Asaf Badouh [Mon, 23 May 2016 14:04:17 +0000 (14:04 +0000)]
[X86][RTM] _xabort() should not have "noreturn" attribute

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

llvm-svn: 270437

6 years ago[InlineAsm] Avoid creating extra string instances in ConstraintInfo::Parse()
Alexander Potapenko [Mon, 23 May 2016 13:58:04 +0000 (13:58 +0000)]
[InlineAsm] Avoid creating extra string instances in ConstraintInfo::Parse()

Don't create unnecessary std::string objects when pushing back to |pCodes|.
NFC.

llvm-svn: 270436

6 years agoTest commit
Jacob Baungard Hansen [Mon, 23 May 2016 13:12:29 +0000 (13:12 +0000)]
Test commit

llvm-svn: 270435

6 years ago[X86][AVX] Added tests that access ymm registers before and after explicit vzeroupper...
Simon Pilgrim [Mon, 23 May 2016 13:03:45 +0000 (13:03 +0000)]
[X86][AVX] Added tests that access ymm registers before and after explicit vzeroupper/vzeroall calls

llvm-svn: 270434

6 years agoReverts "[BPF] Remove exit-on-error flag in test (PR27766)"
Renato Golin [Mon, 23 May 2016 13:02:11 +0000 (13:02 +0000)]
Reverts "[BPF] Remove exit-on-error flag in test (PR27766)"

This patch reverts r270419 because it broke a lot of buildbots,
mostly Windows. We'd like help in investigating the issues, but
for now, it should stay out.

llvm-svn: 270433

6 years agoRemove some unused local variables. NFC.
Michael Kruse [Mon, 23 May 2016 13:00:41 +0000 (13:00 +0000)]
Remove some unused local variables. NFC.

Found by clang static analyzer (http://llvm.org/reports/scan-build/)
and Visual Studio.

llvm-svn: 270432

6 years ago[X86][SSE] Regenerated scalar load folding tests
Simon Pilgrim [Mon, 23 May 2016 12:53:09 +0000 (12:53 +0000)]
[X86][SSE] Regenerated scalar load folding tests

llvm-svn: 270431

6 years ago[X86][SSE] Regenerated partial register update tests
Simon Pilgrim [Mon, 23 May 2016 12:49:37 +0000 (12:49 +0000)]
[X86][SSE] Regenerated partial register update tests

llvm-svn: 270430

6 years agoUse the SCoP directly for canSynthesize [NFC]
Johannes Doerfert [Mon, 23 May 2016 12:47:09 +0000 (12:47 +0000)]
Use the SCoP directly for canSynthesize [NFC]

llvm-svn: 270429

6 years agoSimplify ScopInfo function interfaces [NFC]
Johannes Doerfert [Mon, 23 May 2016 12:45:17 +0000 (12:45 +0000)]
Simplify ScopInfo function interfaces [NFC]

llvm-svn: 270428

6 years agoAllow to check for dominance wrt. a SCoP [NFC]
Johannes Doerfert [Mon, 23 May 2016 12:43:44 +0000 (12:43 +0000)]
Allow to check for dominance wrt. a SCoP [NFC]

llvm-svn: 270427

6 years agoDuplicate part of the Region interface in the Scop class [NFC]
Johannes Doerfert [Mon, 23 May 2016 12:42:38 +0000 (12:42 +0000)]
Duplicate part of the Region interface in the Scop class [NFC]

  This allows to use the SCoP directly for various queries,
  thus to hide the underlying region more often.

llvm-svn: 270426

6 years ago[X86][SSE] Updated sse/avx cvtsi2sd tests to use non-constant value
Simon Pilgrim [Mon, 23 May 2016 12:41:51 +0000 (12:41 +0000)]
[X86][SSE] Updated sse/avx cvtsi2sd tests to use non-constant value

llvm-svn: 270425

6 years agoAdd and use Scop::contains(Loop/BasicBlock/Instruction) [NFC]
Johannes Doerfert [Mon, 23 May 2016 12:40:48 +0000 (12:40 +0000)]
Add and use Scop::contains(Loop/BasicBlock/Instruction) [NFC]

llvm-svn: 270424

6 years ago[X86][SSE2] Regenerated sse2 upgraded intrinsics tests
Simon Pilgrim [Mon, 23 May 2016 12:40:11 +0000 (12:40 +0000)]
[X86][SSE2] Regenerated sse2 upgraded intrinsics tests

llvm-svn: 270423

6 years ago[X86][AVX] Regenerated avx upgraded intrinsics tests
Simon Pilgrim [Mon, 23 May 2016 12:39:06 +0000 (12:39 +0000)]
[X86][AVX] Regenerated avx upgraded intrinsics tests

llvm-svn: 270422

6 years agoDirectly access information through the Scop class [NFC]
Johannes Doerfert [Mon, 23 May 2016 12:38:05 +0000 (12:38 +0000)]
Directly access information through the Scop class [NFC]

llvm-svn: 270421

6 years agoAdd missing doxygen comments [NFC]
Johannes Doerfert [Mon, 23 May 2016 12:36:44 +0000 (12:36 +0000)]
Add missing doxygen comments [NFC]

llvm-svn: 270420

6 years ago[BPF] Remove exit-on-error flag in test (PR27766)
Diana Picus [Mon, 23 May 2016 12:33:34 +0000 (12:33 +0000)]
[BPF] Remove exit-on-error flag in test (PR27766)

The exit-on-error flag on the many_args1.ll test is needed to avoid an
unreachable in BPFTargetLowering::LowerCall. We can also avoid it by ignoring
any superfluous arguments to the call (i.e. any arguments after the first 5).

Fixes PR27766

llvm-svn: 270419

6 years ago[Sparc] LEON erratum fix - Delay Slot Filler modification.
Chris Dewhurst [Mon, 23 May 2016 11:52:28 +0000 (11:52 +0000)]
[Sparc] LEON erratum fix - Delay Slot Filler modification.

This code should have been with the previous check-in (r270417) and prevents the DelaySlotFiller pass being utilized in functions where the erratum fix has been applied as this will break the run-time code.

llvm-svn: 270418

6 years ago[Sparc][LEON] LEON Erratum fix. Insert NOP after LD or LDF instruction.
Chris Dewhurst [Mon, 23 May 2016 10:56:36 +0000 (10:56 +0000)]
[Sparc][LEON] LEON Erratum fix. Insert NOP after LD or LDF instruction.

Due to an erratum in some versions of LEON, we must insert a NOP after any LD or LDF instruction to ensure the processor has time to load the value correctly before using it. This pass will implement that erratum fix.

The code will have no effect for other Sparc, but non-LEON processors.

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

llvm-svn: 270417

6 years agoOptimistic assume required invariant loads to be invariant
Johannes Doerfert [Mon, 23 May 2016 10:40:54 +0000 (10:40 +0000)]
Optimistic assume required invariant loads to be invariant

  Before this patch we bailed if a required invariant load was potentially
  overwritten. However, now we will optimistically assume it is actually
  invariant and, to this end, restrict the valid parameter space as well as the
  execution context with regards to potential overwrites of the location.

llvm-svn: 270416

6 years ago[AMDGPU] Assembler: refactor parsing of modifiers and immediates. Allow modifiers...
Sam Kolton [Mon, 23 May 2016 09:59:02 +0000 (09:59 +0000)]
[AMDGPU] Assembler: refactor parsing of modifiers and immediates. Allow modifiers for imms.

Reviewers: nhaustov, tstellarAMD

Subscribers: kzhuravl, arsenm

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

llvm-svn: 270415

6 years agoTest commit
Jacob Baungard Hansen [Mon, 23 May 2016 09:41:44 +0000 (09:41 +0000)]
Test commit

llvm-svn: 270414

6 years ago[SCCP] Update comment to reflect reality.
Davide Italiano [Mon, 23 May 2016 09:34:50 +0000 (09:34 +0000)]
[SCCP] Update comment to reflect reality.

llvm-svn: 270413

6 years ago[FIX] Require base pointers of loads that might alias to be hoisted
Johannes Doerfert [Mon, 23 May 2016 09:26:46 +0000 (09:26 +0000)]
[FIX] Require base pointers of loads that might alias to be hoisted

  Since the base pointer of a possibly aliasing pointer might not alias
  with any other pointer it (the base pointer) might not be tagged as
  "required invariant". However, we need it do be in order to compare
  the accessed addresses of the derived (possibly aliasing) pointer.

  This patch also tries to clean up the load hoisting a little bit.

llvm-svn: 270412

6 years agoSimplify BlockGenerator::handleOutsideUsers interface [NFC]
Johannes Doerfert [Mon, 23 May 2016 09:14:07 +0000 (09:14 +0000)]
Simplify BlockGenerator::handleOutsideUsers interface [NFC]

llvm-svn: 270411

6 years agoMake the detection context non-constant [NFC]
Johannes Doerfert [Mon, 23 May 2016 09:07:08 +0000 (09:07 +0000)]
Make the detection context non-constant [NFC]

llvm-svn: 270410

6 years ago[FIX] Let ScalarEvolution forget hoisted values
Johannes Doerfert [Mon, 23 May 2016 09:02:54 +0000 (09:02 +0000)]
[FIX] Let ScalarEvolution forget hoisted values

  We have to rethink the handling of escaping values in order to make
  this kind of "fixes" go away.

llvm-svn: 270409

6 years ago[FIX] Synthezise Sdiv/Srem/Udiv instructions correctly.
Johannes Doerfert [Mon, 23 May 2016 08:55:43 +0000 (08:55 +0000)]
[FIX] Synthezise Sdiv/Srem/Udiv instructions correctly.

  This patch simplifies the Sdiv/Srem/Udiv expansion and thereby
  prevents errors, e.g., regarding the insertion point.

llvm-svn: 270408

6 years ago[Clang][AVX512][BUILTIN]adding missing intrinsics for movdaq instruction set
Michael Zuckerman [Mon, 23 May 2016 08:01:48 +0000 (08:01 +0000)]
[Clang][AVX512][BUILTIN]adding missing intrinsics for movdaq instruction set

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

llvm-svn: 270401

6 years agoEnable use of sigaltstack for signal handlers when available. With this,
Richard Smith [Mon, 23 May 2016 06:47:37 +0000 (06:47 +0000)]
Enable use of sigaltstack for signal handlers when available. With this,
backtraces from the signal handler on stack overflow now work reliably (on my
system at least...).

llvm-svn: 270395

6 years ago[X86] Use instruction aliases to replace custom asm parser code for optimizing moves...
Craig Topper [Mon, 23 May 2016 04:02:27 +0000 (04:02 +0000)]
[X86] Use instruction aliases to replace custom asm parser code for optimizing moves to use 2 byte VEX prefix.

llvm-svn: 270394

6 years agoRefactor EhFrameHdr.
Rui Ueyama [Mon, 23 May 2016 03:00:33 +0000 (03:00 +0000)]
Refactor EhFrameHdr.

Previously, EhFrameHdr section computed addresses to which FDEs are
applied to. This is not an ideal design because EhFrameHdr does not
know much about FDEs unless EhFrame passes the information to EhFrameHdr.
It is what we did.

This patch simplifies the code by making EhFrame to compute the
values and pass the cooked information to EhFrameHdr. EhFrameHdr no
longer have to know about the details of FDEs such as FDE encodings.

llvm-svn: 270393

6 years agoDriver: support exherbo's multiarch support
Saleem Abdulrasool [Mon, 23 May 2016 02:17:28 +0000 (02:17 +0000)]
Driver: support exherbo's multiarch support

Exherbo has an alternative file system layout to accommodate multiarch.  The
loader is located at /usr/${triple}/lib/${loader}.  Adjust the Linux toolchain
to support that on exherbo.

llvm-svn: 270392

6 years agoFix typo in documentation comment.
Bob Wilson [Mon, 23 May 2016 01:52:50 +0000 (01:52 +0000)]
Fix typo in documentation comment.

llvm-svn: 270391

6 years agoAdd comment.
Rui Ueyama [Mon, 23 May 2016 01:45:05 +0000 (01:45 +0000)]
Add comment.

llvm-svn: 270390

6 years agoRevert "Modify emitTypeInformation to use MemoryTypeTableBuilder"
David Majnemer [Mon, 23 May 2016 01:37:45 +0000 (01:37 +0000)]
Revert "Modify emitTypeInformation to use MemoryTypeTableBuilder"

This reverts commit r270106.  It results in certain function types
omitted in the output.

llvm-svn: 270389

6 years agoSimplify. NFC.
Rui Ueyama [Mon, 23 May 2016 01:31:10 +0000 (01:31 +0000)]
Simplify. NFC.

llvm-svn: 270388

6 years agoMake file-local function file-local. NFC.
Rui Ueyama [Mon, 23 May 2016 00:45:54 +0000 (00:45 +0000)]
Make file-local function file-local. NFC.

llvm-svn: 270387

6 years agoSplit MergeInputSection's ctor. NFC.
Rui Ueyama [Mon, 23 May 2016 00:40:24 +0000 (00:40 +0000)]
Split MergeInputSection's ctor. NFC.

llvm-svn: 270386

6 years agoMove splitInputSection from EHOutputSection to EHInputSection.
Rui Ueyama [Sun, 22 May 2016 23:53:00 +0000 (23:53 +0000)]
Move splitInputSection from EHOutputSection to EHInputSection.

llvm-svn: 270385

6 years agoAttempt to unbreak buildbots.
Rui Ueyama [Sun, 22 May 2016 23:52:56 +0000 (23:52 +0000)]
Attempt to unbreak buildbots.

My last commit made Clang to fail with an assertion failure.
https://llvm.org/bugs/show_bug.cgi?id=27835
This is a patch to avoid that.

llvm-svn: 270384

6 years ago[AVX512] Add patterns to implement stores of extracts of least signficant subvectors...
Craig Topper [Sun, 22 May 2016 23:44:33 +0000 (23:44 +0000)]
[AVX512] Add patterns to implement stores of extracts of least signficant subvectors using XMM or YMM stores instead of the vector extract instructions.

Similar is already done for AVX and we had lost it going to AVX512VL.

llvm-svn: 270383

6 years agoRefactor EHOutputSection.
Rui Ueyama [Sun, 22 May 2016 23:16:14 +0000 (23:16 +0000)]
Refactor EHOutputSection.

This patch refactors EHOutputSection using SectionPiece struct.
EHRegion class was removed since we can now directly use SectionPiece.

An incomplete support of large CIE/FDE record (> 2^32 bytes) was removed
because it silently created broken executable. There are several places
in the existing code that "size" field is always 4 bytes and at offset 4
in the record, which is not true for 64-bit size records. We will have to
support that in future, but it is better to error out instead of creating
malformed eh_frame sections.

llvm-svn: 270382

6 years ago[Kaleidoscope] Fix static global ordering to prevent crash on exit.
Lang Hames [Sun, 22 May 2016 22:48:36 +0000 (22:48 +0000)]
[Kaleidoscope] Fix static global ordering to prevent crash on exit.

If TheModule is declared before LLVMContext then it will be destructed after it,
crashing when it tries to deregister itself from the destructed context.

llvm-svn: 270381

6 years ago[driver][mips] Follow-up to r270373. Add missed folder.
Simon Atanasyan [Sun, 22 May 2016 22:06:19 +0000 (22:06 +0000)]
[driver][mips] Follow-up to r270373. Add missed folder.

llvm-svn: 270380

6 years ago[X86][SSE] Added extra i8 extract element test
Simon Pilgrim [Sun, 22 May 2016 20:35:42 +0000 (20:35 +0000)]
[X86][SSE] Added extra i8 extract element test

llvm-svn: 270379

6 years ago[x86, AVX] don't add a vzeroupper if that's what the code is already doing (PR27823)
Sanjay Patel [Sun, 22 May 2016 20:22:47 +0000 (20:22 +0000)]
[x86, AVX] don't add a vzeroupper if that's what the code is already doing (PR27823)

This isn't the complete fix, but it handles the trivial examples of duplicate vzero* ops in PR27823:
https://llvm.org/bugs/show_bug.cgi?id=27823
...and amusingly, the bogus cases already exist as regression tests, so let's take this baby step.

We'll need to do more in the general case where there's legitimate AVX usage in the function + there's
already a vzero in the code.

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

llvm-svn: 270378

6 years agoSymbolFile: remove an unused variable
Saleem Abdulrasool [Sun, 22 May 2016 20:16:53 +0000 (20:16 +0000)]
SymbolFile: remove an unused variable

Address a -Wunused-but-set-variable warning from gcc.  NFC.

llvm-svn: 270377

6 years ago[sanitizer] Don't use -fomit-frame-pointer in COMPILER_RT_DEBUG=On builds
Kuba Brecka [Sun, 22 May 2016 19:59:06 +0000 (19:59 +0000)]
[sanitizer] Don't use -fomit-frame-pointer in COMPILER_RT_DEBUG=On builds

Using -fomit-frame-pointer sometimes makes a crash log miss some frames. Let's not use this optimization in debug builds.

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

llvm-svn: 270376