Commit Graph

233625 Commits

Author SHA1 Message Date
Chandler Carruth b05edfc10d Use a two-level cast through an intptr_t, and make them C-style casts.
This shouldn't have any functional difference, but it appears to be the
pattern used for other methods on DynamicLibrary, and it should avoid
the -Wpedantic warning on one of the build bots about the direct
reinterpret_cast.

llvm-svn: 272461
2016-06-11 08:19:59 +00:00
Chandler Carruth 34033f10de Add a using declaration so that the overrides don't hide some of the
base class methods.

This was caught by GCC's -Woverloaded-virtual, not sure why it wasn't
caught by Clang's. =/

llvm-svn: 272460
2016-06-11 08:12:17 +00:00
Chandler Carruth 306e270b83 Compare to an unsigned literal to avoid a -Wsign-compare warning.
llvm-svn: 272459
2016-06-11 08:02:01 +00:00
Chandler Carruth 3ecbd9d287 Use const_cast to cast away constness. This silences a warning.
llvm-svn: 272458
2016-06-11 08:01:57 +00:00
NAKAMURA Takumi f1b183c402 DebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning temporary object to ArrayRef.
llvm-svn: 272457
2016-06-11 06:37:28 +00:00
Chandler Carruth c41e081f71 Fix this test to handle NDEBUG builds which don't have a name for the
basic block.

llvm-svn: 272456
2016-06-11 06:32:56 +00:00
Lang Hames 717eacfcf4 [MCJIT] Update MCJIT and get the fibonacci example working again.
MCJIT will now set the DataLayout on a module when it is added to the JIT,
rather than waiting until it is codegen'd, and the runFunction method will
finalize the module containing the function to be run before running it.

The fibonacci example has been updated to include and link against MCJIT.

llvm-svn: 272455
2016-06-11 05:47:04 +00:00
Chandler Carruth 1256cc818b Revert "Strip Android version when looking up toolchain paths."
This reverts commit r272413. The tests here have been failing on several
different build bots for over 10 hours.

llvm-svn: 272454
2016-06-11 04:57:29 +00:00
Chandler Carruth b1bcd5dc7b Revert "[ASTMatchers] New forEachOverriden matcher."
This reverts commit r272386. It doesn't compile with MSVC and those bots
have been red the entire day as a consequence.

llvm-svn: 272453
2016-06-11 04:45:38 +00:00
Craig Topper 68738332b8 [AVX512] Implement 512-bit and masked shufflelo and shufflehi intrinsics directly with __builtin_shufflevector and __builtin_ia32_select. Also improve the formatting of the AVX2 version.
llvm-svn: 272452
2016-06-11 03:31:13 +00:00
Craig Topper d4273a425e [AVX512] Add _mm512_bsrli_epi128 and _mm512_bslli_epi128 intrinsics.
llvm-svn: 272451
2016-06-11 03:31:07 +00:00
Craig Topper 40abd1cc61 [AVX512] Add support for lowering v32i16 shuffles with repeated lanes. This allows us to create 512-bit PSHUFLW/PSHUFHW.
llvm-svn: 272450
2016-06-11 03:27:42 +00:00
Craig Topper b9b86fcfff [AVX512] No need to check for BWI being enabled before lowering v32i16 and v64i8 shuffles. If we get this far the types are already legal which means BWI must be enabled.
llvm-svn: 272449
2016-06-11 03:27:37 +00:00
Mike Spertus 334aa07915 Visual Studio visualizers associated with LookupResults
Visualizers for DeclAccessPair, UnresolvedSet, and LookupResult. For example,
when combined with LLVM diff D21256 (currently in review), a Lookup set will
show much more naturally in the Locals window something like

  Found: {public typename ...Ts}

llvm-svn: 272448
2016-06-11 03:02:33 +00:00
David Majnemer 5d321e63c0 [Sema] Return an appropriate result from CheckSpecifiedExceptionType
We shouldn't return true from CheckSpecifiedExceptionType if
the record type is incomplete and -fms-extensions is engaged.  Otherwise
we will have an incomplete AST.

llvm-svn: 272447
2016-06-11 01:25:04 +00:00
Matthias Braun 959a8c974d LiveIntervalAnalysis: findLastUseBefore() must ignore undef uses.
undef uses are no real uses of a register and must be ignored by
findLastUseBefore() so that handleMove() does not produce invalid live
intervals in some cases.

This fixed http://llvm.org/PR28083

llvm-svn: 272446
2016-06-11 00:31:28 +00:00
Greg Clayton 940f425a43 Add missing #include for linux.
<rdar://problem/25501013>

llvm-svn: 272445
2016-06-10 23:53:06 +00:00
Greg Clayton 88f86b60ca On MacOSX, the threads can appear out of order at times depending on the order in which the kernel returns thread IDs to debugserver. To avoid thread lists changing order between stops, ProcessGDBRemote now makes sure the thread list stays sorted by thread index ID.
<rdar://problem/25501013> 

llvm-svn: 272444
2016-06-10 23:23:34 +00:00
Dan Albert ff2addf703 Add `REQUIRES: c++experimental` where appropriate.
Summary:
I haven't added it to all the tests, just those that fail without it
(those that aren't header only).

Reviewers: EricWF, mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 272443
2016-06-10 22:45:11 +00:00
Qin Zhao bc8fbeacf3 [esan|cfrag] Handle complex GEP instr in the cfrag tool
Summary:
Iterates all (except the first and the last) operands within each GEP
instruction for instrumentation.

Adds test struct_field_gep.ll.

Reviewers: aizatsky

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

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

llvm-svn: 272442
2016-06-10 22:28:55 +00:00
Mike Spertus 3f19966441 Added missing close brace to OpaquePtr Visual Studio visualizer
This syntax error resulted in garbage being appended to OpaquePtr visualizations

llvm-svn: 272441
2016-06-10 22:25:43 +00:00
Zachary Turner d4c1efcb69 Try again to fix this endianness issue.
llvm-svn: 272440
2016-06-10 22:12:18 +00:00
Michael Zolotukhin b98294d006 Don't try to rotate a loop more than once - we never do this anyway.
Summary:
I can't find a case where we can rotate a loop more than once, and it looks
like we never do this. To rotate a loop following conditions should be met:
1) its header should be exiting
2) its latch shouldn't be exiting

But after the first rotation the header becomes the new latch, so this
condition can never be true any longer.

Tested on with an assert on LNT testsuite and make check.

Reviewers: hfinkel, sanjoy

Subscribers: sebpop, sanjoy, llvm-commits, mzolotukhin

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

llvm-svn: 272439
2016-06-10 22:03:56 +00:00
Pirama Arumuga Nainar e5d2d71a60 Revise RenderScript attribute declaration
Summary:
Address post-patch comments to r272342.

- Rename the 'kernel' attribute's name
- Idiomatically restrict the attribute to the 'RenderScript' LangOpt.

Reviewers: aaron.ballman, rsmith

Subscribers: cfe-commits, srhines

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

llvm-svn: 272438
2016-06-10 21:51:18 +00:00
Zachary Turner 97609bb2fd [pdb] Fix issues with pdb writing.
This fixes an alignment issue by forcing all cached allocations
to be 8 byte aligned, and also fixes an issue arising on big
endian systems by writing ulittle32_t's instead of uint32_t's
in the test.

llvm-svn: 272437
2016-06-10 21:47:26 +00:00
Sebastian Pop e1f60b1fb3 MemorySSA: fix memory access local dominance function for live on entry
A memory access defined on function entry cannot be locally dominated by another memory access.
The patch was split from http://reviews.llvm.org/D19338 which exposes the problem.

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

llvm-svn: 272436
2016-06-10 21:36:41 +00:00
Sanjoy Das 39c226fdba [STLExtras] Introduce and use llvm::count_if; NFC
(This is split out from was D21115)

llvm-svn: 272435
2016-06-10 21:18:39 +00:00
Greg Clayton 9e3ee13a1c Fixed C++ template integer parameter types to work correctly when the integer type is signed.
Prior to this we would display the typename for "TestObj<-1>" as "TestObj<4294967295>" when we showed the type. Expression parsing could also fail because we would fail to find the mangled name when evaluating expressions.

The issue was we were losing the signed'ness of the template integer parameter in DWARFASTParserClang.cpp.

<rdar://problem/25577041>

llvm-svn: 272434
2016-06-10 20:56:09 +00:00
Quentin Colombet f2a1909bb5 [IRTranslator] Support the translation of or.
Now or instructions get translated into G_OR.

llvm-svn: 272433
2016-06-10 20:50:35 +00:00
Quentin Colombet 401d0a1ac9 [IRTranslator] Rework the comments for the methods to translate.
NFC.

llvm-svn: 272432
2016-06-10 20:50:33 +00:00
Quentin Colombet 13c55e07ed [IRTranslator] Refactor to expose a translateBinaryOp method.
This method will be used for every binary operation.

NFC.

llvm-svn: 272431
2016-06-10 20:50:18 +00:00
Chad Rosier d1f6c840ee [AArch64] Move comments closer to relevant check. NFC.
llvm-svn: 272430
2016-06-10 20:49:18 +00:00
Chad Rosier c5083c2ccf [AArch64] Refactor a check earlier. NFC.
llvm-svn: 272429
2016-06-10 20:47:14 +00:00
Xinliang David Li 153e8b6c85 [profile] cleanup file setting code
Differential Revision: http://reviews.llvm.org/D21219

llvm-svn: 272428
2016-06-10 20:35:01 +00:00
Sanjay Patel b114fd65fc [x86] enable bitcasted fabs/fneg transforms
The vector cases don't change because we already have folds in X86ISelLowering
to look through and remove bitcasts.

llvm-svn: 272427
2016-06-10 20:33:50 +00:00
Etienne Bergeron 2e50fedb2c [CodeGen] Fix PrologEpilogInserter to avoid duplicate allocation of SEH structs
Summary:
When stack-protection is activated and WinEH exceptions is used, 
the EHRegNode (exception handling registration) is allocated twice on the stack.

This was not breaking anything except loosing space on the stack.

```
D:\src\llvm\examples>llc exc2.ll  -debug-only=pei
alloc FI(0) at SP[-24]
alloc FI(1) at SP[-48]   <<-- Allocated
alloc FI(1) at SP[-72]   <<-- Allocated twice!?
alloc FI(2) at SP[-76]
alloc FI(4) at SP[-80]
alloc FI(3) at SP[-84]
```

Reviewers: rnk, majnemer

Subscribers: chrisha, llvm-commits

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

llvm-svn: 272426
2016-06-10 20:24:38 +00:00
David Majnemer cef7d378b6 [-fms-extensions] Don't crash on explicit class-scope specializations & default arguments
The code had a typo it was doing:
  Param->setUninstantiatedDefaultArg(Param->getUninstantiatedDefaultArg());

This is a no-op but may assert, we wanted to do:
  Param->setUninstantiatedDefaultArg(OldParam->getUninstantiatedDefaultArg());

This fixes PR28082.

llvm-svn: 272425
2016-06-10 20:21:15 +00:00
Saleem Abdulrasool 094f17beeb Driver: make it easier to select the SjLj EH model
GCC still permits enabling the SjLj EH model.  This is something which can be
done on various targets.  Hoist the -fsjlj-exceptions option into the driver and
pass it through.  This allows one to opt into the alternative EH model while
retaining the default to be the target's default.

Resolves PR27749!

llvm-svn: 272424
2016-06-10 20:12:00 +00:00
Greg Clayton 6c42aa777e Fixed a few places that were building a regex from an identifier without escaping the identifier text.
<rdar://problem/26090553> 

llvm-svn: 272423
2016-06-10 20:09:33 +00:00
Nico Weber 2cf5e89e1d Remove a few gendered pronouns.
llvm-svn: 272422
2016-06-10 20:06:03 +00:00
Evgeniy Stepanov eaea297df4 Disable MSan-hostile loop unswitching.
Loop unswitching may cause MSan false positive when the unswitch
condition is not guaranteed to execute.

This is very similar to ASan and TSan special case in
llvm::isSafeToSpeculativelyExecute (they don't like speculative loads
and stores), but for branch instructions.

This is a workaround for PR28054.

llvm-svn: 272421
2016-06-10 20:03:20 +00:00
Evgeniy Stepanov 122f984a33 Move isGuaranteedToExecute out of LICM.
Also rename LICMSafetyInfo to LoopSafetyInfo.
Both will be used in LoopUnswitch in a separate change.

llvm-svn: 272420
2016-06-10 20:03:17 +00:00
Zhan Jun Liau ab42cbce98 [SystemZ] Support Compare and Traps
Support and generate Compare and Traps like CRT, CIT, etc.

Support Trap as legal DAG opcodes and generate "j .+2" for them by default.
Add support for Conditional Traps and use the If Converter to convert them into
the corresponding compare and trap opcodes.

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

llvm-svn: 272419
2016-06-10 19:58:10 +00:00
Tom Stellard f3af841462 AMDGPU/SI: Don't use fixup_si_rodata for scratch rsrc relocations
Summary:
We need to set the fixup type to FK_Data_4 for the
SCRATCH_RSRC_DWORD[01] symbols, since these require absolute
relocations, and fixup_si_rodata is for relative relocations.

Reviewers: arsenm, kzhuravl

Subscribers: arsenm, kzhuravl, llvm-commits

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

llvm-svn: 272417
2016-06-10 19:26:38 +00:00
Mehdi Amini cbd68ecf04 Move CodeGen test from Generic to X86 specific directory
llvm-svn: 272416
2016-06-10 19:14:01 +00:00
Nico Weber a691689ae8 Remove a few gendered pronouns.
llvm-svn: 272415
2016-06-10 18:53:04 +00:00
Mehdi Amini 1d396832d3 Interprocedural Register Allocation (IPRA): add a Transformation Pass
Adds a MachineFunctionPass that scans the body to find calls, and
update the register mask with the one saved by the
RegUsageInfoCollector analysis in PhysicalRegisterUsageInfo.

Patch by Vivek Pandya <vivekvpandya@gmail.com>

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

llvm-svn: 272414
2016-06-10 18:37:21 +00:00
Josh Gao 4e9cef0491 Strip Android version when looking up toolchain paths.
Summary:
Android target triples can include a version number in the abi field
(e.g. 'aarch64-linux-android21'), used for checking for availability.
However, the driver was searching for toolchain binaries using the
passed in triple as a prefix.

Reviewers: srhines, danalbert, t.p.northover

Subscribers: t.p.northover, aemerson, tberghammer, danalbert, srhines, cfe-commits

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

llvm-svn: 272413
2016-06-10 18:30:33 +00:00
David Majnemer b2b0da4ad0 [-fms-extensions] Permit incomplete types in dynamic exception specifications
Microsoft headers, comdef.h and comutil.h, assume that this is an OK
thing to do.  Downgrade the hard error to a warning if we are in
-fms-extensions mode.

This fixes PR28080.

llvm-svn: 272412
2016-06-10 18:24:41 +00:00
Sanjay Patel d558bdadd2 [x86] add test for PR28044
llvm-svn: 272411
2016-06-10 18:05:55 +00:00