David Majnemer [Fri, 12 Jun 2015 17:55:44 +0000 (17:55 +0000)]
[MS ABI] Lock-in the derived memptr rep. for base-to-derived conversions
We would get this right in the case where an explicit cast was formed
but not when we were performing an implicit conversion.
This fixes PR23828.
llvm-svn: 239625
Pete Cooper [Fri, 12 Jun 2015 17:48:21 +0000 (17:48 +0000)]
Remove a bunch of inline keywords from User. NFC.
This came up in the patch review for http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20150608/281362.html.
llvm-svn: 239624
Pete Cooper [Fri, 12 Jun 2015 17:48:18 +0000 (17:48 +0000)]
Move OperandList to be allocated prior to User for hung off subclasses.
For hung off uses, we need a Use* to tell use where the operands are.
This was User::OperandList but we want to remove that to save space
of all subclasses which aren't making use of 'hung off uses'.
Hung off uses now allocate their own 'OperandList' Use* in the
User::new which they call.
getOperandList() now uses the hung off uses bit to work out where the
Use* for the OperandList lives. If a User has hung off uses, then this
bit tells them to go back a single Use* from the User* and use that
value as the OperandList.
If a User has no hung off uses, then we get the first operand by
subtracting (NumOperands * sizeof(Use)) from the User this pointer.
This saves a pointer from User and all subclasses. Given the average
size of a subclass of User is 112 or 128 bytes, this saves around 7% of space
With malloc tending to align to 16-bytes the real saving is typically more like 3.5%.
On 'opt -O2 verify-uselistorder.lto.bc', peak memory usage prior to this change
is 149MB and after is 143MB so the savings are around 2.5% of peak.
Looking at some passes which allocate many Instructions and Values, parseIR drops
from 54.25MB to 52.21MB while the Inliner calls to Instruction::clone() drops
from 28.20MB to 27.05MB.
Reviewed by Duncan Exon Smith.
llvm-svn: 239623
Pete Cooper [Fri, 12 Jun 2015 17:48:14 +0000 (17:48 +0000)]
Added a version of User::new for hung off uses.
There are now 2 versions of User::new. The first takes a size_t and is the current
implementation for subclasses which need 0 or more Use's allocated for their operands.
The new version takes no extra arguments to say that this subclass needs 'hung off uses'.
The HungOffUses bool is now set in this version of User::new and we can assert in
allocHungOffUses that we are allowed to have hung off uses.
This ensures we call the correct version of User::new for subclasses which need hung off uses.
A future commit will then allocate space for a single Use* which will be used
in place of User::OperandList once that field has been removed.
Reviewed by Duncan Exon Smith.
llvm-svn: 239622
Pete Cooper [Fri, 12 Jun 2015 17:48:10 +0000 (17:48 +0000)]
Rename NumOperands to make it clear its managed by the User. NFC.
This is to try make it very clear that subclasses shouldn't be changing
the value directly. Now that OperandList for normal instructions is computed
using the NumOperands, its critical that the NumOperands is accurate or we
could compute the wrong offset to the first operand.
I looked over all places which update NumOperands and they are all safe.
Hung off use User's don't use NumOperands to compute the OperandList so they
are safe to continue to manipulate it. The only other User which changed it
was GlobalVariable which has an optional init list but always allocated space
for a single Use. It was correctly setting NumOperands to 1 before setting an
initializer, and setting it to 0 after clearing the init list, so the order was safe.
Added some comments to that code to make sure that this isn't changed in future
without being aware of this constraint.
Reviewed by Duncan Exon Smith.
llvm-svn: 239621
Pete Cooper [Fri, 12 Jun 2015 17:48:05 +0000 (17:48 +0000)]
Replace all accesses to User::OperandList with getter and setter methods. NFC.
We don't want anyone to access OperandList directly as its going to be removed
and computed instead. This uses getter's and setter's instead in which we
can later change the underlying implementation of OperandList.
Reviewed by Duncan Exon Smith.
llvm-svn: 239620
Gabor Ballabas [Fri, 12 Jun 2015 17:33:37 +0000 (17:33 +0000)]
Allow case-insensitive values for -mcpu for AArch64 target in line with GCC.
GCC allows case-insensitive values for -mcpu, -march and -mtune options.
This patch implements the same behaviour for the -mcpu option for the AArch64 target.
llvm-svn: 239619
Rafael Espindola [Fri, 12 Jun 2015 17:23:39 +0000 (17:23 +0000)]
Have the ELF symbol predicates match more directly the spec.
The underlaying issues is that this code can't really know if an OS specific or
processor specific section number should return true or false.
One option would be to assert or return an error, but that looks like over
engineering since extensions are not that common.
It seems better to have these be direct implementation of the ELF spec so that
they are natural for someone familiar with ELF reading the code.
Code that does have to handle OS/Architecture specific values can do it at
a higher level.
llvm-svn: 239618
Greg Bedwell [Fri, 12 Jun 2015 16:33:38 +0000 (16:33 +0000)]
Use Clang version numbers for the Windows VERSIONINFO resource.
When setting the VERSIONINFO resource to embed version information into exe and
DLL files on Windows, override the default LLVM version number values with their
clang equivalents.
llvm-svn: 239617
Pete Cooper [Fri, 12 Jun 2015 16:13:54 +0000 (16:13 +0000)]
Don't create instructions from ConstantExpr's in CFLAliasAnalysis.
The CFLAA code currently calls ConstantExpr::getAsInstruction which creates an instruction from a constant expr.
We then pass that instruction to the InstVisitor to analyze it.
Its not necessary to create these instructions as we can just cast from Constant to Operator in the visitor. This is how other InstVisitor’s such as SelectionDAGBuilder handle ConstantExpr.
llvm-svn: 239616
Simon Atanasyan [Fri, 12 Jun 2015 16:13:14 +0000 (16:13 +0000)]
[Mips] Handle TLS relocations in -static linking mode
llvm-svn: 239615
Simon Atanasyan [Fri, 12 Jun 2015 16:13:00 +0000 (16:13 +0000)]
[Mips] Define _gpxxx symbols in both static/dynamic linking modes
llvm-svn: 239614
Simon Atanasyan [Fri, 12 Jun 2015 16:12:50 +0000 (16:12 +0000)]
[Mips] Setup EI_ABIVERSION flag
- Set EI_ABIVERSION to '1' in case of non-PIC executable.
- Set EI_ABIVERSION to '3' in case of using FP64/FP64A floating point ABI.
llvm-svn: 239613
Greg Bedwell [Fri, 12 Jun 2015 15:58:29 +0000 (15:58 +0000)]
In MSVC builds embed a VERSIONINFO resource in our exe and DLL files.
This reinstates my commits r238740/r238741 which I reverted due to a failure
in the clang-cl selfhost tests on Windows. I've now fixed the issue in
clang-cl that caused the failure so hopefully all should be well now.
llvm-svn: 239612
Luke Cheeseman [Fri, 12 Jun 2015 15:52:39 +0000 (15:52 +0000)]
This patch makes the NEON intrinsics vget_lane_f16, vgetq_lane_f16,
vset_lane_f16 and vsetq_lane_f16 available in AArch32.
Differential Revision: http://reviews.llvm.org/D10388
llvm-svn: 239610
Sylvestre Ledru [Fri, 12 Jun 2015 15:50:27 +0000 (15:50 +0000)]
scan-build: Remove useless whitespace in File path
Patch by Honggyu Kim
Summary:
This patch removes useless whitespace in File path in index.html
Previously, a File directory path is copied and pasted as below:
arch /arm /kernel /stacktrace.c
It just removes the whitespace between directories and makes the
copied string as below:
arch/arm/kernel/stacktrace.c
The output looks same in html format, but the copied directory path
can be pasted as it looks.
Reviewers: krememek, zaks.anna, sylvestre.ledru
Reviewed By: sylvestre.ledru
Subscribers: aemerson, cfe-commits
Differential Revision: http://reviews.llvm.org/D10354
llvm-svn: 239609
Douglas Katzman [Fri, 12 Jun 2015 15:45:21 +0000 (15:45 +0000)]
Allow ToolChain to decide if Clang is not the right C compiler.
Removed comment in Driver::ShouldUseClangCompiler implying that there
was an opt-out ability at that point - there isn't.
Differential Revision: http://reviews.llvm.org/D10246
llvm-svn: 239608
Benjamin Kramer [Fri, 12 Jun 2015 15:31:50 +0000 (15:31 +0000)]
push_back() loop -> append() for random access iterators.
append will resize the vector to the optimal size. No functional change
intended.
llvm-svn: 239607
Benjamin Kramer [Fri, 12 Jun 2015 14:39:08 +0000 (14:39 +0000)]
[clang-format] Use in-class initializers to simplify constructor.
Sadly C++11 doesn't let us use initializers on bitfield members (DR1341). NFC.
llvm-svn: 239606
Benjamin Kramer [Fri, 12 Jun 2015 13:07:03 +0000 (13:07 +0000)]
[clang-format] Reorder and pack ParenState members to minimize padding
sizeof(ParenState) goes from 64 bytes to 52 bytes. NFC.
llvm-svn: 239605
Benjamin Kramer [Fri, 12 Jun 2015 13:06:57 +0000 (13:06 +0000)]
[clang-format] Hoist vector allocation out of loop. NFC.
llvm-svn: 239604
Rafael Espindola [Fri, 12 Jun 2015 12:42:13 +0000 (12:42 +0000)]
Remove a hack that tries to align '*'.
The alignment is not required, so we can just remove it for now.
The old code is a hack as it depends on the buffer management to find
the current column.
If the alignment is really desirable, the proper way to do it is
to pass in a formatted_raw_stream that knows the current column.
llvm-svn: 239603
Rafael Espindola [Fri, 12 Jun 2015 12:20:03 +0000 (12:20 +0000)]
Don't depend on the interleaving of stdout and stderr.
That can change as we change the buffering.
llvm-svn: 239602
Alexander Potapenko [Fri, 12 Jun 2015 11:27:06 +0000 (11:27 +0000)]
[ASan] format AddressSanitizer.cpp with `clang-format -style=Google`, NFC
llvm-svn: 239601
Daniel Jasper [Fri, 12 Jun 2015 09:59:16 +0000 (09:59 +0000)]
clang-format: Always add space before lambda-{
Before:
int c = []() -> int *{ return 2; }();
After:
int c = []() -> int * { return 2; }();
Based on patch by James Dennett (http://reviews.llvm.org/D10410), thank you!
llvm-svn: 239600
John Brawn [Fri, 12 Jun 2015 09:38:51 +0000 (09:38 +0000)]
[ARM] Disabling vfp4 should disable fp16
ARMTargetParser::getFPUFeatures should disable fp16 whenever it
disables vfp4, as otherwise something like -mcpu=cortex-a7 -mfpu=none
leaves us with fp16 enabled (though the only effect that will have is
a wrong build attribute).
Differential Revision: http://reviews.llvm.org/D10397
llvm-svn: 239599
Yaron Keren [Fri, 12 Jun 2015 08:19:32 +0000 (08:19 +0000)]
Replace duplicated iplist<T> types with the corresponding typedefs.
llvm-svn: 239598
Daniel Jasper [Fri, 12 Jun 2015 07:15:33 +0000 (07:15 +0000)]
clang-format: Understand C-style case in case label.
Before:
case (my_int) ONE:
After:
case (my_int)ONE:
This fixed llvm.org/PR23760
llvm-svn: 239597
Yaron Keren [Fri, 12 Jun 2015 05:15:27 +0000 (05:15 +0000)]
Rangify for loops, NFC.
llvm-svn: 239596
Daniel Jasper [Fri, 12 Jun 2015 05:08:18 +0000 (05:08 +0000)]
clang-format: [JS] Support "export enum" declarations.
llvm-svn: 239595
Daniel Jasper [Fri, 12 Jun 2015 04:58:27 +0000 (04:58 +0000)]
clang-format: [JS] Add tests to ensure clang-format doesn't break code
by triggering automatic semicolon insertion changes.
NFC intended. Patch by Martin Probst.
llvm-svn: 239594
Daniel Jasper [Fri, 12 Jun 2015 04:56:34 +0000 (04:56 +0000)]
clang-format: [JS] Fix regression caused by r239592.
Without it, it would do:
interface I {
x: string;
} var y;
llvm-svn: 239593
Daniel Jasper [Fri, 12 Jun 2015 04:52:02 +0000 (04:52 +0000)]
clang-format: [JS] fix incorrectly collapsed lines after export
statement.
When an exported function would follow a class declaration, it would not
be recognized as a stand-alone function. That would then collapse the
following line with the current one, e.g.
class C {}
export function f() {} var x;
llvm-svn: 239592
Nico Weber [Fri, 12 Jun 2015 04:44:52 +0000 (04:44 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 239591
Peter Collingbourne [Fri, 12 Jun 2015 03:25:05 +0000 (03:25 +0000)]
LowerBitSets: Give names to aliases of unnamed bitset element objects.
It is valid for globals to be unnamed, but aliases must have a name. To avoid
creating invalid IR, we need to assign names to any aliases we create that
point to unnamed objects that have been moved into combined globals.
llvm-svn: 239590
Teresa Johnson [Fri, 12 Jun 2015 03:12:00 +0000 (03:12 +0000)]
Revert commit r239480 as it causes https://code.google.com/p/chromium/issues/detail?id=499508#c3.
llvm-svn: 239589
Teresa Johnson [Fri, 12 Jun 2015 03:11:50 +0000 (03:11 +0000)]
Revert commit r239481 as it is dependent on reverted llvm commit r239480.
llvm-svn: 239588
Richard Smith [Fri, 12 Jun 2015 02:13:45 +0000 (02:13 +0000)]
Add missing #include, found by modules build.
llvm-svn: 239587
Alexey Samsonov [Fri, 12 Jun 2015 01:48:47 +0000 (01:48 +0000)]
[SanitizerCoverage] Use llvm::getDISubprogram() to get location of the entry basic block.
DebugLoc::getFnDebugLoc() should soon be removed. Also,
getDISubprogram() might become more effective soon and wouldn't need to
scan debug locations at all, if function-level metadata would be emitted
by Clang.
llvm-svn: 239586
Alexey Samsonov [Fri, 12 Jun 2015 01:39:48 +0000 (01:39 +0000)]
[GVN] Use a simpler form of IRBuilder constructor.
Summary:
A side effect of this change is that it IRBuilder now automatically
created debug info locations for new instructions, which is the
same as debug location of insertion point. This is fine for the
functions in questions (GetStoreValueForLoad and
GetMemInstValueForLoad), as they are used in two situations:
* GVN::processLoad, which tries to eliminate a load. In this case
new instructions would have the same debug location as the load they
eventually replace;
* MaterializeAdjustedValue, which adds new instructions to the end
of the basic blocks, which could later be used to replace the load
definition. In this case we don't yet know the way the load would
be eventually replaced (either by assembling the precomputed values
via PHI, or by using them directly), so just using the basic block
strategy seems to be reasonable. There is also a special case
in the code that *would* adjust the location of the last
instruction replacing the load definition to the location of the
load.
Test Plan: regression test suite
Reviewers: echristo, dberlin, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10405
llvm-svn: 239585
Alexey Samsonov [Fri, 12 Jun 2015 01:39:45 +0000 (01:39 +0000)]
[GVN] Use IRBuilder more actively instead of creating instructions manually.
llvm-svn: 239584
Eric Christopher [Fri, 12 Jun 2015 01:36:05 +0000 (01:36 +0000)]
Add a warning for unsupported elements of the target attribute.
Since we're ignoring the tune= and fpmath= attributes go ahead
and add a warning alerting people to the fact that we're going
to ignore that part of it during code generation and tie it to
the attribute warning set.
llvm-svn: 239583
Eric Christopher [Fri, 12 Jun 2015 01:36:00 +0000 (01:36 +0000)]
Handle fpmath= in the target attribute.
Right now we're ignoring the fpmath attribute since there's no
backend support for a feature like this and to do so would require
checking the validity of the strings and doing general subtarget
feature parsing of valid and invalid features with the target
attribute feature.
llvm-svn: 239582
Eric Christopher [Fri, 12 Jun 2015 01:35:58 +0000 (01:35 +0000)]
Handle -mno-<feature> in target attribute strings by replacing the
-mno- with a -<feature> to match how we handle this in the rest
of the frontend.
llvm-svn: 239581
Eric Christopher [Fri, 12 Jun 2015 01:35:56 +0000 (01:35 +0000)]
Add support for tune= to the target attribute support by ignoring it.
We don't currently support the -mtune option in any useful way
so ignoring the annotation is fine.
llvm-svn: 239580
Eric Christopher [Fri, 12 Jun 2015 01:35:52 +0000 (01:35 +0000)]
Add support for the the target attribute.
Modeled after the gcc attribute of the same name, this feature
allows source level annotations to correspond to backend code
generation. In llvm particular parlance, this allows the adding
of subtarget features and changing the cpu for a particular function
based on source level hints.
This has been added into the existing support for function level
attributes without particular verification for any target outside
of whether or not the backend will support the features/cpu given
(similar to section, etc).
llvm-svn: 239579
Richard Smith [Fri, 12 Jun 2015 01:32:13 +0000 (01:32 +0000)]
[modules] Apply name visibility rules to names found by ADL.
llvm-svn: 239578
Eric Fiselier [Fri, 12 Jun 2015 00:41:34 +0000 (00:41 +0000)]
Fix PR23293 - Do not unlock shared state before notifying consumers.
Within the shared state methods do not unlock the lock guards manually. This
could cause a race condition where the shared state is destroyed before the
method is complete.
llvm-svn: 239577
David Majnemer [Fri, 12 Jun 2015 00:17:26 +0000 (00:17 +0000)]
[IRGen] Fix the MSVC2013 build
llvm-svn: 239576
Richard Smith [Thu, 11 Jun 2015 23:46:11 +0000 (23:46 +0000)]
[modules] Fix crash with multiple levels of default template argument merging.
llvm-svn: 239575
Reid Kleckner [Thu, 11 Jun 2015 23:37:18 +0000 (23:37 +0000)]
[WinEH] Put finally pointers in the handler scope table field
We were putting them in the filter field, which is correct for 64-bit
but wrong for 32-bit.
Also switch the order of scope table entry emission so outermost entries
are emitted first, and fix an obvious state assignment bug.
llvm-svn: 239574
Sean Silva [Thu, 11 Jun 2015 23:34:13 +0000 (23:34 +0000)]
[cleanup] Remove some unused #ifdef's
This is all going through the VFS layer now, so there's nothing
platform-specific here.
llvm-svn: 239573
Tyler Nowicki [Thu, 11 Jun 2015 23:23:17 +0000 (23:23 +0000)]
Add assume_safety option for pragma loop vectorize and interleave.
Specifying #pragma clang loop vectorize(assume_safety) on a loop adds the
mem.parallel_loop_access metadata to each load/store operation in the loop. This
metadata tells loop access analysis (LAA) to skip memory dependency checking.
llvm-svn: 239572
NAKAMURA Takumi [Thu, 11 Jun 2015 23:04:56 +0000 (23:04 +0000)]
MC: Prune \return corresponding to r239552. [-Wdocumentation]
llvm-svn: 239571
Lang Hames [Thu, 11 Jun 2015 22:51:01 +0000 (22:51 +0000)]
[Orc] Attempted fix for GCC ICE on Polly builder.
Along the same lines as the fix in r228568.
llvm-svn: 239570
Richard Smith [Thu, 11 Jun 2015 22:48:25 +0000 (22:48 +0000)]
[modules] Fix assert/crash when parsing and merging a definition of a class with a base-specifier inside a namespace.
llvm-svn: 239569
Juergen Ributzka [Thu, 11 Jun 2015 22:40:04 +0000 (22:40 +0000)]
[Stackmaps][X86] Remove EFLAGS and IP registers from the live-out mask.
Remove the EFLAGS from the stackmap live-out mask. The EFLAGS register is not
supposed to be part of that set, because the X86 calling conventions mark the
register as NOT preserved.
Also remove the IP registers, since spilling and restoring those doesn't really
make any sense.
Related to rdar://problem/
21019635.
llvm-svn: 239568
Reid Kleckner [Thu, 11 Jun 2015 22:32:23 +0000 (22:32 +0000)]
[WinEH] Create an llvm.x86.seh.exceptioninfo intrinsic
This intrinsic is like framerecover plus a load. It recovers the EH
registration stack allocation from the parent frame and loads the
exception information field out of it, giving back a pointer to an
EXCEPTION_POINTERS struct. It's designed for clang to use in SEH filter
expressions instead of accessing the EXCEPTION_POINTERS parameter that
is available on x64.
This required a minor change to MC to allow defining a label variable to
another absolute framerecover label variable.
llvm-svn: 239567
Reid Kleckner [Thu, 11 Jun 2015 22:22:45 +0000 (22:22 +0000)]
[Support] Fix a race initializing a static local in MSVC
static local initialization isn't thread safe with MSVC and a race was
reported in PR23817. We can't use std::atomic because it's not trivially
constructible, so instead do some lame volatile global integer
manipulation.
llvm-svn: 239566
Michael Zolotukhin [Thu, 11 Jun 2015 22:17:39 +0000 (22:17 +0000)]
Update stale comment before analyzeLoopUnrollCost. NFC.
llvm-svn: 239565
Lang Hames [Thu, 11 Jun 2015 22:12:24 +0000 (22:12 +0000)]
[Orc] Remove some unnecesary includes and whitespace that slipped in to r239561.
NFC.
llvm-svn: 239564
Peter Collingbourne [Thu, 11 Jun 2015 21:49:54 +0000 (21:49 +0000)]
COFF: Symbol resolution for common and comdat symbols defined in bitcode.
In the case where either a bitcode file and a regular file or two bitcode
files export a common or comdat symbol with the same name, the linker needs
to pick one of them following COFF semantics. This patch implements a design
for resolving such symbols that pushes most of the work onto either LLD's
regular mechanism for resolving common or comdat symbols or the IR linker's
mechanism for doing the same.
We modify SymbolBody::compare to always prefer non-bitcode symbols, so that
during the initial phase of symbol resolution, the symbol table always contains
a regular symbol in any case where we need to choose between a regular and
a bitcode symbol. In SymbolTable::addCombinedLTOObject, we force export
any bitcode symbols that were initially pre-empted by a regular symbol,
and later use SymbolBody::compare to choose between the regular symbol in
the symbol table and the regular symbol from the combined LTO object file.
This design seems to be sound, so long as the resolution mechanism is defined
to be commutative and associative modulo arbitrary choices between symbols
(which seems to be the case for COFF).
Differential Revision: http://reviews.llvm.org/D10329
llvm-svn: 239563
Marshall Clow [Thu, 11 Jun 2015 21:47:39 +0000 (21:47 +0000)]
Change #ifdefs in test to UNSUPPORTED. No functionality change in the tests
llvm-svn: 239562
Lang Hames [Thu, 11 Jun 2015 21:45:19 +0000 (21:45 +0000)]
[Orc] Make partition identification in the CompileOnDemand layer lazy.
This also breaks out the logical dylib symbol resolution logic.
llvm-svn: 239561
Peter Collingbourne [Thu, 11 Jun 2015 21:42:18 +0000 (21:42 +0000)]
Object: Prepend __imp_ when mangling a dllimport symbol in IRObjectFile.
We cannot prepend __imp_ in the IR mangler because a function reference may
be emitted unmangled in a constant initializer. The linker is expected to
resolve such references to thunks. This is covered by the new test case.
Strictly speaking we ought to emit two undefined symbols, one with __imp_ and
one without, as we cannot know which symbol the final object file will refer
to. However, this would require rather intrusive changes to IRObjectFile,
and lld works fine without it for now.
This reimplements r239437, which was reverted in r239502.
Differential Revision: http://reviews.llvm.org/D10400
llvm-svn: 239560
Peter Collingbourne [Thu, 11 Jun 2015 21:41:27 +0000 (21:41 +0000)]
LTO: expose LTO_SYMBOL_COMDAT flag, which indicates that the definition is part of a comdat group.
Reviewers: rafael
Subscribers: llvm-commits, ruiu
Differential Revision: http://reviews.llvm.org/D10330
llvm-svn: 239559
Hans Wennborg [Thu, 11 Jun 2015 21:21:57 +0000 (21:21 +0000)]
[ms] Do lookup in dependent base classes also when overload resolution fails (PR23810)
This patch does two things in order to enable compilation of the problematic code in PR23810:
1. In Sema::buildOverloadedCallSet, it postpones lookup for MS mode when no
viable candidate is found in the overload set. Previously, lookup would only
be postponed here if the overload set was empty.
2. Make BuildRecoveryCallExpr call Sema::DiagnoseEmptyLookup under more circumstances.
There is a comment in DiagnoseTwoPhaseLookup that says "Don't diagnose names we find in
classes; we get much better diagnostics for these from DiagnoseEmptyLookup." The problem
was that DiagnoseEmptyLookup might not get called later, and we failed to recover.
Differential Revision: http://reviews.llvm.org/D10369
llvm-svn: 239558
Douglas Katzman [Thu, 11 Jun 2015 20:03:23 +0000 (20:03 +0000)]
Fix English usage in command line flag help string.
llvm-svn: 239556
Davide Italiano [Thu, 11 Jun 2015 19:59:04 +0000 (19:59 +0000)]
[ELF] Introduce getValue() for ELF Symbols.
Differential Revision: http://reviews.llvm.org/D10328
Reviewed by: rafael
llvm-svn: 239555
Daniel Sanders [Thu, 11 Jun 2015 19:41:26 +0000 (19:41 +0000)]
Replace string GNU Triples with llvm::Triple in TargetMachine. NFC.
Summary:
For the moment, TargetMachine::getTargetTriple() still returns a StringRef.
This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: ted, llvm-commits, rengolin, jholewinski
Differential Revision: http://reviews.llvm.org/D10362
llvm-svn: 239554
Ahmed Bougacha [Thu, 11 Jun 2015 19:30:37 +0000 (19:30 +0000)]
[CodeGen] ArrayRef'ize cond/pred in various TII APIs. NFC.
llvm-svn: 239553
Rafael Espindola [Thu, 11 Jun 2015 18:58:08 +0000 (18:58 +0000)]
Generalize emitAbsoluteSymbolDiff.
This makes emitAbsoluteSymbolDiff always succeed and moves logic from the asm
printer to it.
The object one now also works on ELF. If two symbols are in the same fragment,
we will never move them apart.
llvm-svn: 239552
Alexey Samsonov [Thu, 11 Jun 2015 18:25:54 +0000 (18:25 +0000)]
Set proper debug location for branch added in BasicBlock::splitBasicBlock().
This improves debug locations in passes that do a lot of basic block
transformations. Important case is LoopUnroll pass, the test for correct
debug locations accompanies this change.
Test Plan: regression test suite
Reviewers: dblaikie, sanjoy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10367
llvm-svn: 239551
Alexey Samsonov [Thu, 11 Jun 2015 18:25:44 +0000 (18:25 +0000)]
[LoopUnroll] Use IRBuilder to create branch instructions.
Use IRBuilder::Create(Cond)?Br instead of constructing instructions
manually with BranchInst::Create(). It's consistent with other
uses of IRBuilder in this pass, and has an additional important
benefit:
Using IRBuilder will ensure that new branch instruction will get
the same debug location as original terminator instruction it will
eventually replace.
For now I'm not adding a testcase, as currently original terminator
instruction also lack debug location due to missing debug location
propagation in BasicBlock::splitBasicBlock. That is, the testcase
will accompany the fix for the latter I'm going to mail soon.
llvm-svn: 239550
Ahmed Bougacha [Thu, 11 Jun 2015 18:19:34 +0000 (18:19 +0000)]
[CodeGen] Emit Constants for immediate inlineasm arguments.
For inline assembly immediate constraints, we currently always use
EmitScalarExpr, instead of directly emitting the constant. When the
overflow sanitizer is enabled, this generates overflow intrinsics
instead of constants.
Instead, emit a constant for constraints that either require an
immediate (e.g. 'I' on X86), or only accepts constants (immediate
or symbolic; i.e., don't accept registers or memory).
Fixes PR19763.
Differential Revision: http://reviews.llvm.org/D10255
llvm-svn: 239549
Hans Wennborg [Thu, 11 Jun 2015 18:14:11 +0000 (18:14 +0000)]
clang-cl: Add an alias for /wd4910
llvm-svn: 239548
Hans Wennborg [Thu, 11 Jun 2015 17:51:58 +0000 (17:51 +0000)]
Spell -Wdllexport-explicit-instantiation-decl correctly.
llvm-svn: 239547
Jonathan Peyton [Thu, 11 Jun 2015 17:36:16 +0000 (17:36 +0000)]
Remove unused variables '__kmp_build_check_*' for non assert builds.
Add new LIBOMP_ENABLE_ASSERTIONS macro which can be set in a standalone build
or takes the value of LLVM_ENABLE_ASSERTIONS when inside llvm/projects. This
change also defines the KMP_BUILD_ASSERT() macro to do nothing when ENABLE_ASSERTIONS
is off. This means the __kmp_build_check_* types won't be defined and thus, no warnings.
http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000719.html
Patch by Jack Howarth and Jonathan Peyton
llvm-svn: 239546
Benjamin Kramer [Thu, 11 Jun 2015 17:30:34 +0000 (17:30 +0000)]
Replace an instance of custom atomics with standard ones.
Eventually I want to get rid of them entirely, but Statistic.h is still blocked
on MSVC bugs. No functionality change.
llvm-svn: 239545
Rafael Espindola [Thu, 11 Jun 2015 17:30:33 +0000 (17:30 +0000)]
This reverts commit r239529 and r239514.
Revert "[AArch64] Match interleaved memory accesses into ldN/stN instructions."
Revert "Fixing MSVC 2013 build error."
The test/CodeGen/AArch64/aarch64-interleaved-accesses.ll test was failing on OS X.
llvm-svn: 239544
Reid Kleckner [Thu, 11 Jun 2015 17:25:24 +0000 (17:25 +0000)]
Revert "Fix merges of non-zero vector stores"
This reverts commit r239539.
It was causing SDAG assertions while building freetype.
llvm-svn: 239543
Jonathan Peyton [Thu, 11 Jun 2015 17:23:57 +0000 (17:23 +0000)]
Implement recursive CMake.
Most CMake build systems put CMakeLists.txt files inside source directories where
items need to get built. This change follows that convention by adding a new
runtime/src/CMakeLists.txt file. An additional benefit is this helps logically
seperate configuring with building as well. This change is mostly just copying and
pasting the bottom half of runtime/CMakeLists.txt into runtime/src/CMakeLists.txt,
but a few changes had to be made to get it to work. Most of those changes were to
directory prefixes.
Differential Revision: http://reviews.llvm.org/D10344
llvm-svn: 239542
Douglas Katzman [Thu, 11 Jun 2015 16:46:27 +0000 (16:46 +0000)]
Fix comment typos.
llvm-svn: 239541
Matt Arsenault [Thu, 11 Jun 2015 16:13:39 +0000 (16:13 +0000)]
SLSR: Pass address space to isLegalAddressingMode
This only updates one of the uses. The other is used in cases
that may never touch memory, so I'm not sure why this is even
calling it. Perhaps there should be a new, similar hook for such
cases or pass -1 for unknown address space.
llvm-svn: 239540
Matt Arsenault [Thu, 11 Jun 2015 16:03:52 +0000 (16:03 +0000)]
Fix merges of non-zero vector stores
Now actually stores the non-zero constant instead of 0.
I somehow forgot to include this part of r238108.
The test change was just an independent instruction order swap,
so just add another check line to satisfy CHECK-NEXT.
llvm-svn: 239539
Daniel Sanders [Thu, 11 Jun 2015 15:34:59 +0000 (15:34 +0000)]
Replace string GNU Triples with llvm::Triple in computeDataLayout(). NFC.
Summary:
This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, jfb, rengolin
Differential Revision: http://reviews.llvm.org/D10361
llvm-svn: 239538
Douglas Katzman [Thu, 11 Jun 2015 15:05:22 +0000 (15:05 +0000)]
Add comments to PrintActions1 and Driver::PrintActions.
Differential Revision: http://reviews.llvm.org/D10214
llvm-svn: 239537
Sanjay Patel [Thu, 11 Jun 2015 14:53:41 +0000 (14:53 +0000)]
add the -mrecip driver flag and process its options (3rd try)
The 1st and 2nd tries to land this (r238055, r238851) were reverted due to
bot failures caused by the LLVM part of the patch. That was hopefully fixed
after r239001.
This is the front-end counterpart to D8982.
The -mrecip option interface is based on maintaining compatibility with gcc:
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289
...while adding more functionality (allowing users to specify the number of refinement steps for each
estimate type).
Differential Revision: http://reviews.llvm.org/D8989
llvm-svn: 239536
Tom Stellard [Thu, 11 Jun 2015 14:51:50 +0000 (14:51 +0000)]
R600/SI: Define latency for flat instructions
llvm-svn: 239535
Tom Stellard [Thu, 11 Jun 2015 14:51:49 +0000 (14:51 +0000)]
R600/SI: Move flat instruction defs to CIInstructions.td
llvm-svn: 239534
Tom Stellard [Thu, 11 Jun 2015 14:51:46 +0000 (14:51 +0000)]
R600/SI: Add -mcpu=bonaire to a test that uses flat address space
Flat instructions don't exist on SI, but there is a bug in the backend that
allows them to be selected.
llvm-svn: 239533
Sanjay Patel [Thu, 11 Jun 2015 14:26:49 +0000 (14:26 +0000)]
remove function names from comments; NFC
llvm-svn: 239532
Daniel Jasper [Thu, 11 Jun 2015 13:31:45 +0000 (13:31 +0000)]
clang-format: Make SFS_Inline imply SFS_Empty.
In the long run, these two might be independent or we might to only
allow specific combinations. Until we have a corresponding request,
however, it is hard to do the right thing and choose the right
configuration options. Thus, just don't touch the options yet and
just modify the behavior slightly.
llvm-svn: 239531
Daniel Jasper [Thu, 11 Jun 2015 13:29:20 +0000 (13:29 +0000)]
clang-format: [JS] Ensure that formatting actually takes place in tests.
And fix formatting issue discovered by that :-).
llvm-svn: 239530
Aaron Ballman [Thu, 11 Jun 2015 13:06:02 +0000 (13:06 +0000)]
Fixing MSVC 2013 build error.
llvm-svn: 239529
Yaron Keren [Thu, 11 Jun 2015 12:33:25 +0000 (12:33 +0000)]
C++11 rangify several loops.
llvm-svn: 239528
Gabor Ballabas [Thu, 11 Jun 2015 12:29:56 +0000 (12:29 +0000)]
Allow case-insensitive values for -march for ARM in line with GCC.
GCC allows case-insensitive values for -mcpu, -march and -mtune options.
This patch implements the same behaviour for the -march option for ARM.
llvm-svn: 239527
Daniel Marjamaki [Thu, 11 Jun 2015 12:28:14 +0000 (12:28 +0000)]
Token: complement is() method with isOneOf() to allow easier usage
llvm-svn: 239526
Toma Tabacu [Thu, 11 Jun 2015 12:13:18 +0000 (12:13 +0000)]
[mips] Pass on -m{single,double}-float to GAS.
Summary: We already pass these to the IAS, but not to GAS.
Reviewers: dsanders, atanasyan
Reviewed By: atanasyan
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10358
llvm-svn: 239525
Alexey Bataev [Thu, 11 Jun 2015 10:53:56 +0000 (10:53 +0000)]
[OPENMP] Fox for llvm.org/PR23663: OpenMP crash
Destroy RuntimeCleanupScope before generation of termination instruction in parallel loop precondition.
llvm-svn: 239524