Rafael Espindola [Fri, 17 Apr 2015 11:27:13 +0000 (11:27 +0000)]
Add a proper fix for pr23025.
Instead of avoiding looking past every global symbol, only do so
if the symbol is in a comdat.
llvm-svn: 235181
Denis Protivensky [Fri, 17 Apr 2015 11:24:11 +0000 (11:24 +0000)]
[ARM] Test R_ARM_TLS_LE32 for dynamic executable
llvm-svn: 235180
Colin Riley [Fri, 17 Apr 2015 11:20:30 +0000 (11:20 +0000)]
Fix cmake build on osx after r235109
llvm-svn: 235179
Benjamin Kramer [Fri, 17 Apr 2015 11:12:43 +0000 (11:12 +0000)]
[mc] Clean up emission of byte sequences
No functional change intended.
llvm-svn: 235178
Yaron Keren [Fri, 17 Apr 2015 11:09:18 +0000 (11:09 +0000)]
Eliminate superfluous CloseHandle(PI.ProcessHandle).
This handle will always be closed few lines later, resulting in
an error for the second CloseHandle.
llvm-svn: 235177
Sagar Thakur [Fri, 17 Apr 2015 10:14:16 +0000 (10:14 +0000)]
test commit
llvm-svn: 235176
NAKAMURA Takumi [Fri, 17 Apr 2015 10:01:30 +0000 (10:01 +0000)]
lli/OrcLazyJIT.cpp: Use <cstdio> for printf(3) introduced in r234908.
llvm-svn: 235175
Nico Weber [Fri, 17 Apr 2015 09:50:28 +0000 (09:50 +0000)]
Follow-up to r235046: selectany only causes a definition if it's not inherited.
(For example needed to parse system header inputscope.h, which first has
an extern "C" selectany IID and then later an extern "C" declaration of that
same IID.)
llvm-svn: 235174
Daniel Sanders [Fri, 17 Apr 2015 09:50:21 +0000 (09:50 +0000)]
[mips] Move ABI-dependent register selections to MipsABIInfo. NFC.
Summary:
For example, a common idiom was 'isN64 ? Mips::SP_64 : Mips::SP'. This has
been moved to MipsABIInfo and replaced with 'ABI.GetStackPtr()'.
There are others that should also be moved. This patch sticks to the ones that
are obviously non-functional. The others have minor mistakes that need fixing
at the same time, mostly involving checks for 64-bit GPR's instead of checks
for 64-bit pointers.
Reviewers: tomatabacu
Reviewed By: tomatabacu
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8972
llvm-svn: 235173
Tamas Berghammer [Fri, 17 Apr 2015 09:37:06 +0000 (09:37 +0000)]
Make several test case arm32 compatible
llvm-svn: 235172
Tamas Berghammer [Fri, 17 Apr 2015 09:36:59 +0000 (09:36 +0000)]
Fix mapping symbol handling on arm 32/64
The debug info section contains some $d mapping symbol what is
overlapping with code sections in other sections of the object file
causing problem in the address class detection. This CL ignores these
symboles from the address class map as the debug info sections don't use
this map.
Differential revision: http://reviews.llvm.org/D9050
llvm-svn: 235171
Nico Weber [Fri, 17 Apr 2015 09:10:43 +0000 (09:10 +0000)]
Revert r235154-r235156, they cause asserts when building win64 code (crbug.com/477988)
llvm-svn: 235170
Pavel Labath [Fri, 17 Apr 2015 09:05:26 +0000 (09:05 +0000)]
XFAILing TestPrintStackTraces on linux to stabilize the build bot
llvm-svn: 235169
Rafael Espindola [Fri, 17 Apr 2015 09:05:25 +0000 (09:05 +0000)]
Add a reduced testcase from pr23025.
llvm-svn: 235168
Rafael Espindola [Fri, 17 Apr 2015 08:46:11 +0000 (08:46 +0000)]
Don't walk aliases from global to local symbols in comdats.
This fixes pr23196.
llvm-svn: 235167
Nico Weber [Fri, 17 Apr 2015 08:32:38 +0000 (08:32 +0000)]
Move fixit for const init from note to diag, weaken to warning in MS mode.
r235046 turned "extern __declspec(selectany) int a;" from a declaration into
a definition to fix PR23242 (required for compatibility with mc.exe output).
However, this broke parsing Windows headers: A d3d11 headers contain something
like
struct SomeStruct {};
extern const __declspec(selectany) SomeStruct some_struct;
This is now a definition, and const objects either need an explicit default
ctor or an initializer so this errors out with
d3d11.h(1065,48) :
error: default initialization of an object of const type
'const CD3D11_DEFAULT' without a user-provided default constructor
(cl.exe just doesn't implement this rule, independent of selectany.)
To work around this, weaken this error into a warning for selectany decls
in microsoft mode, and recover with zero-initialization.
Doing this is a bit hairy since it adds a fixit on an error emitted
by InitializationSequence – this means it needs to build a correct AST, which
in turn means InitializationSequence::Failed() cannot return true when this
fixit is applied. As a workaround, the patch adds a fixit member to
InitializationSequence, and InitializationSequence::Perform() prints the
diagnostic if the fixit member is set right after its call to Diagnose.
That function is usually called when InitializationSequences are used –
InitListChecker::PerformEmptyInit() doesn't call it, but the InitListChecker
case never performs default-initialization, so this is technically OK.
This is the alternative, original fix for PR20208 that got reviewed in the
thread "[patch] Improve diagnostic on default-initializing const variables
(PR20208)". This change basically reverts r213725, adds the original fix for
PR20208, and makes the error a warning in Microsoft mode.
llvm-svn: 235166
Rafael Espindola [Fri, 17 Apr 2015 08:11:38 +0000 (08:11 +0000)]
Write relocation sections contiguously.
Linkers normally read all the relocations upfront to compute the references
between sections. Putting them together is a bit more cache friendly.
I benchmarked linking a Release+Asserts clang with gold on a vm. I tried all
4 combinations of --gc-sections/no --gc-section hot and cold cache.
I cleared the cache with
echo 3 > /proc/sys/vm/drop_caches
and warmed it up by running the link once before timing the subsequent ones.
With cold cache and --gc-sections the time goes from
1.
86130781665 +- 0.
01713126697463843 seconds
to
1.
82370735105 +- 0.
014127522318814516 seconds
With cold cache and no --gc-sections the time goes from
1.
6087245435500002 +- 0.
012999066825178644 seconds
to
1.
5687122041500001 +- 0.
013145850126026619 seconds
With hot cache and no --gc-sections the time goes from
0.
926200939 ( +- 0.33% ) seconds
to
0.
907200079 ( +- 0.31% ) seconds
With hot cache and gc sections the time goes from
1.
183038049 ( +- 0.34% ) seconds
to
1.
147355862 ( +- 0.39% ) seconds
llvm-svn: 235165
Robert Flack [Fri, 17 Apr 2015 08:02:18 +0000 (08:02 +0000)]
Uses the target platform to determine the platform context.
Uses the target platform to determine the platform context to use. This fixes an
early failure in some tests when running on a different remote target.
Test Plan:
./dotest.py $DOTEST_OPTS -t -p TestGlobalVariables.py|TestSharedLib.py
Running on macosx -> linux, this fails at a later stage in the test - rather
than in registerSharedLibrariesWithTarget looking for a library without the
correct "lib" prefix and ".so" suffix.
Differential Revision: http://reviews.llvm.org/D9047
llvm-svn: 235164
Daniel Jasper [Fri, 17 Apr 2015 08:01:41 +0000 (08:01 +0000)]
Revert file unintentionally changed in r235162.
llvm-svn: 235163
Daniel Jasper [Fri, 17 Apr 2015 07:59:19 +0000 (07:59 +0000)]
clang-format: Add default fallback style.
Thanks to Michael Schlottke.
llvm-svn: 235162
David Majnemer [Fri, 17 Apr 2015 06:57:25 +0000 (06:57 +0000)]
[MS ABI] Use the right types for filter and finally blocks
The type for abnormal_termination can't be an i1, it an i8.
Filter functions return 'LONG', not 'int'.
llvm-svn: 235161
David Blaikie [Fri, 17 Apr 2015 06:40:14 +0000 (06:40 +0000)]
[opaque pointer type] Explicit pointee type for call instruction
Use an extra bit in the CCInfo to flag the newer version of the
instructiont hat includes the type explicitly.
Tested the newer error cases I added, but didn't add tests for the finer
granularity improvements to existing error paths.
llvm-svn: 235160
David Blaikie [Fri, 17 Apr 2015 06:40:11 +0000 (06:40 +0000)]
Narrow down the type of CallInst::getFunctionType to a FunctionType
llvm-svn: 235159
Jason Molenda [Fri, 17 Apr 2015 05:01:58 +0000 (05:01 +0000)]
Add a "force_kill" arg to Process::Destroy(). This is needed after
the changes in r233255/r233258. Normally if lldb attaches to
a running process, when we call Process::Destroy, we want to detach
from the process. If lldb launched the process itself, ::Destroy
should kill it.
However, if we attach to a process and the driver calls SBProcess::Kill()
(which calls Destroy), we need to kill it even if we didn't launch it
originally.
The force_kill param allows for the SBProcess::Kill method to force the
behavior of Destroy.
<rdar://problem/
20424439>
llvm-svn: 235158
Enrico Granata [Fri, 17 Apr 2015 01:50:11 +0000 (01:50 +0000)]
Fix a bug where argdumper would not launch inferiors correctly in the presence of arguments of the form word1\ word2 (vs. the quoted form "word1 word2")
Fixes rdar://
20493444
llvm-svn: 235157
Reid Kleckner [Fri, 17 Apr 2015 01:09:53 +0000 (01:09 +0000)]
Fix test failure due to racing commits
It looks like r235145 changed the .ll syntax for variadic calls. Update
tests to use the new syntax.
llvm-svn: 235156
Reid Kleckner [Fri, 17 Apr 2015 01:03:30 +0000 (01:03 +0000)]
Fix unused variable warning
llvm-svn: 235155
Reid Kleckner [Fri, 17 Apr 2015 01:01:27 +0000 (01:01 +0000)]
[SEH] Reimplement x64 SEH using WinEHPrepare
This now emits simple, unoptimized xdata tables for __C_specific_handler
based on the handlers listed in @llvm.eh.actions calls produced by
WinEHPrepare.
This adds support for running __finally blocks when exceptions are
thrown, and removes the old landingpad fan-in codepath.
I ran some manual execution tests on small basic test cases with and
without optimization, as well as on Chrome base_unittests, which uses a
small amount of SEH. I'm sure there are bugs, and we may need to
revert.
llvm-svn: 235154
Jim Ingham [Fri, 17 Apr 2015 00:44:36 +0000 (00:44 +0000)]
Fix "help language", the languages printer was assuming the
eLanguageType numbers would be sequential, but vendor types
are not and the printer went crazy.
llvm-svn: 235153
Duncan P. N. Exon Smith [Fri, 17 Apr 2015 00:37:53 +0000 (00:37 +0000)]
DebugInfo: Fixup r235149 after IR change in r235145
This shouldn't have used varargs anyway; change the functions to be
`void`. Also remove my accidentally-committed directory path.
llvm-svn: 235152
Jingyue Wu [Fri, 17 Apr 2015 00:25:10 +0000 (00:25 +0000)]
[NaryReassociate] run NaryReassociate iteratively
Summary:
An alternative is to use a worklist approach. However, that approach
would break the traversing order so that we couldn't lookup SeenExprs
efficiently. I don't see a clear winner here, so I picked the easier approach.
Along with two minor improvements:
1. preserves ScalarEvolution by forgetting instructions replaced
2. removes dead code locally avoiding the need of running DCE afterwards
Test Plan: add to slsr-add.ll a test that requires multiple iterations
Reviewers: broune, dberlin, atrick, meheff
Reviewed By: atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9058
llvm-svn: 235151
David Blaikie [Fri, 17 Apr 2015 00:19:34 +0000 (00:19 +0000)]
Improve const-ness
This allows callers to pass a char ** (such as the one coming from the
standard decreed main declaration - even though everyone usually puts
const on that themselves).
llvm-svn: 235150
Duncan P. N. Exon Smith [Fri, 17 Apr 2015 00:18:46 +0000 (00:18 +0000)]
DebugInfo: Simplify testcase from LiveDebugVariables fix in r235140
This testcase is less brittle and exactly tests for the misbehaviour.
Thanks to David Blaikie for the suggestion.
llvm-svn: 235149
Ahmed Bougacha [Thu, 16 Apr 2015 23:57:07 +0000 (23:57 +0000)]
[AArch64] Don't assert on f16 in DUP PerfectShuffle generator.
Found by code inspection, but breaking i16 at least breaks other tests.
They aren't checking this in particular though, so also add some
explicit tests for the already working types.
llvm-svn: 235148
David Blaikie [Thu, 16 Apr 2015 23:25:00 +0000 (23:25 +0000)]
[opaque pointer types] Explicit non-pointer type for call expressions
(migration for recent LLVM change to textual IR for calls)
llvm-svn: 235147
David Blaikie [Thu, 16 Apr 2015 23:24:52 +0000 (23:24 +0000)]
[opaque pointer types] Explicit non-pointer type for call expressions
(migration for recent LLVM change to textual IR for calls)
llvm-svn: 235146
David Blaikie [Thu, 16 Apr 2015 23:24:18 +0000 (23:24 +0000)]
[opaque pointer type] Add textual IR support for explicit type parameter to the call instruction
See r230786 and r230794 for similar changes to gep and load
respectively.
Call is a bit different because it often doesn't have a single explicit
type - usually the type is deduced from the arguments, and just the
return type is explicit. In those cases there's no need to change the
IR.
When that's not the case, the IR usually contains the pointer type of
the first operand - but since typed pointers are going away, that
representation is insufficient so I'm just stripping the "pointerness"
of the explicit type away.
This does make the IR a bit weird - it /sort of/ reads like the type of
the first operand: "call void () %x(" but %x is actually of type "void
()*" and will eventually be just of type "ptr". But this seems not too
bad and I don't think it would benefit from repeating the type
("void (), void () * %x(" and then eventually "void (), ptr %x(") as has
been done with gep and load.
This also has a side benefit: since the explicit type is no longer a
pointer, there's no ambiguity between an explicit type and a function
that returns a function pointer. Previously this case needed an explicit
type (eg: a function returning a void() function was written as
"call void () () * @x(" rather than "call void () * @x(" because of the
ambiguity between a function returning a pointer to a void() function
and a function returning void).
No ambiguity means even function pointer return types can just be
written alone, without writing the whole function's type.
This leaves /only/ the varargs case where the explicit type is required.
Given the special type syntax in call instructions, the regex-fu used
for migration was a bit more involved in its own unique way (as every
one of these is) so here it is. Use it in conjunction with the apply.sh
script and associated find/xargs commands I've provided in rr230786 to
migrate your out of tree tests. Do let me know if any of this doesn't
cover your cases & we can iterate on a more general script/regexes to
help others with out of tree tests.
About 9 test cases couldn't be automatically migrated - half of those
were functions returning function pointers, where I just had to manually
delete the function argument types now that we didn't need an explicit
function type there. The other half were typedefs of function types used
in calls - just had to manually drop the * from those.
import fileinput
import sys
import re
pat = re.compile(r'((?:=|:|^|\s)call\s(?:[^@]*?))(\s*$|\s*(?:(?:\[\[[a-zA-Z0-9_]+\]\]|[@%](?:(")?[\\\?@a-zA-Z0-9_.]*?(?(3)"|)|{{.*}}))(?:\(|$)|undef|inttoptr|bitcast|null|asm).*$)')
addrspace_end = re.compile(r"addrspace\(\d+\)\s*\*$")
func_end = re.compile("(?:void.*|\)\s*)\*$")
def conv(match, line):
if not match or re.search(addrspace_end, match.group(1)) or not re.search(func_end, match.group(1)):
return line
return line[:match.start()] + match.group(1)[:match.group(1).rfind('*')].rstrip() + match.group(2) + line[match.end():]
for line in sys.stdin:
sys.stdout.write(conv(re.search(pat, line), line))
llvm-svn: 235145
Greg Clayton [Thu, 16 Apr 2015 23:13:26 +0000 (23:13 +0000)]
Define LIBXML2_DEFINED in the Xcode project for Xcode builds so Darwin builds can take advantage of the new GDB register info from the target XML.
Also add "#if defined( LIBXML2_DEFINED )" around code that already used libxml2 in SymbolVendorMacOSX.cpp.
Cleaned up some warnings in ProcessGDBRemote.cpp.
llvm-svn: 235144
Greg Clayton [Thu, 16 Apr 2015 23:11:06 +0000 (23:11 +0000)]
Fix warnings about construction ordering.
llvm-svn: 235143
Greg Clayton [Thu, 16 Apr 2015 23:10:22 +0000 (23:10 +0000)]
Use a singleton accessor for the static list of alternate mangling prefixes so we don't have a global constructor. Apple build systems like for shared libraries to have no global constructors.
llvm-svn: 235142
Kevin Enderby [Thu, 16 Apr 2015 22:33:20 +0000 (22:33 +0000)]
For llvm-objdump, dump the (__OBJC,__protocol) section for Objc1 32-bit Mach-O files
with the -section option as objc_protocol_t structs.
llvm-svn: 235141
Duncan P. N. Exon Smith [Thu, 16 Apr 2015 22:27:54 +0000 (22:27 +0000)]
DebugInfo: Fix UserValue::match() in LiveDebugVariables after r235050
r235050 dropped the inlined-at field from `MDLocalVariable`, deferring
to the `!dbg` attachments. Fix `UserValue` to take the `!dbg` into
account when differentiating between variables.
llvm-svn: 235140
Duncan P. N. Exon Smith [Thu, 16 Apr 2015 22:14:20 +0000 (22:14 +0000)]
AsmPrinter: Remove dead code, NFC
llvm-svn: 235139
Duncan P. N. Exon Smith [Thu, 16 Apr 2015 22:12:59 +0000 (22:12 +0000)]
AsmPrinter: Simplify logic for debug info intrinsics' !dbg attachments
These are required, so just assume they're there.
llvm-svn: 235138
Chaoren Lin [Thu, 16 Apr 2015 22:03:43 +0000 (22:03 +0000)]
Fix TestPluginCommands for gcc.
Summary: gcc requires that LDFLAGS come after DYLIB_OBJECTS.
Test Plan: TestPluginCommands passes.
Reviewers: sivachandra, pcc, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9045
llvm-svn: 235137
Chris Bieneman [Thu, 16 Apr 2015 21:58:22 +0000 (21:58 +0000)]
Updating symbol wildcards one more time.
This should catch all C++ symbols containing llvm in the name.
llvm-svn: 235136
Fariborz Jahanian [Thu, 16 Apr 2015 21:52:34 +0000 (21:52 +0000)]
[Objective-C Sema]. In my last patch change the
attribute name to objc_independent_class.
rdar://
20255473
llvm-svn: 235135
Marshall Clow [Thu, 16 Apr 2015 21:36:54 +0000 (21:36 +0000)]
A few bits of N2994 didn't get fully implemented a long time ago. Thanks to STL@microsoft.com for the bug report
llvm-svn: 235134
Pete Cooper [Thu, 16 Apr 2015 21:19:36 +0000 (21:19 +0000)]
Disable AArch64 fast-isel on big-endian call vector returns.
A big-endian vector return needs a byte-swap which we aren't doing right now.
For now just bail on these cases to get correctness back.
llvm-svn: 235133
Sanjoy Das [Thu, 16 Apr 2015 20:29:50 +0000 (20:29 +0000)]
[IR] Introduce a dereferenceable_or_null(N) attribute.
Summary:
If a pointer is marked as dereferenceable_or_null(N), LLVM assumes it
is either `null` or `dereferenceable(N)` or both. This change only
introduces the attribute and adds a token test case for the `llvm-as`
/ `llvm-dis`. It does not hook up other parts of the optimizer to
actually exploit the attribute -- those changes will come later.
For pointers in address space 0, `dereferenceable(N)` is now exactly
equivalent to `dereferenceable_or_null(N)` && `nonnull`. For other
address spaces, `dereferenceable(N)` is potentially weaker than
`dereferenceable_or_null(N)` && `nonnull` (since we could have a null
`dereferenceable(N)` pointer).
The motivating case for this change is Java (and other managed
languages), where pointers are either `null` or dereferenceable up to
some usually known-at-compile-time constant offset.
Reviewers: rafael, hfinkel
Reviewed By: hfinkel
Subscribers: nicholas, llvm-commits
Differential Revision: http://reviews.llvm.org/D8650
llvm-svn: 235132
Davide Italiano [Thu, 16 Apr 2015 18:44:35 +0000 (18:44 +0000)]
Surround assignments w/ parenthesis to avoid mistakes.
This also silences a warning.
llvm-svn: 235131
Jingyue Wu [Thu, 16 Apr 2015 18:43:44 +0000 (18:43 +0000)]
[NFC] [MachO] remove extra semicolons
llvm-svn: 235130
Jingyue Wu [Thu, 16 Apr 2015 18:42:31 +0000 (18:42 +0000)]
[NaryReassociate] speeds up candidate searching
Summary:
This fixes a left-over efficiency issue in D8950.
As Andrew and Daniel suggested, we can store the candidates in a stack
and pop the top element when it does not dominate the current
instruction. This reduces the worst-case time complexity to O(n).
Test Plan: a new test in nary-add.ll that exercises this optimization.
Reviewers: broune, dberlin, meheff, atrick
Reviewed By: atrick
Subscribers: llvm-commits, sanjoy
Differential Revision: http://reviews.llvm.org/D9055
llvm-svn: 235129
Fariborz Jahanian [Thu, 16 Apr 2015 18:38:44 +0000 (18:38 +0000)]
[Objective-C Sema] patch to introduce IndependentClass
attribute to be placed on Objective-C pointer typedef
to make them strong enough so on their "new" method
family no attempt is made to override these
types. rdar://
20255473
llvm-svn: 235128
Chris Bieneman [Thu, 16 Apr 2015 18:36:32 +0000 (18:36 +0000)]
Properly escaping the quotes so that bash doesn't do stupid things with the wildcards.
llvm-svn: 235127
Davide Italiano [Thu, 16 Apr 2015 18:36:16 +0000 (18:36 +0000)]
Use the correct type, and silence a warning.
llvm-svn: 235126
Chris Bieneman [Thu, 16 Apr 2015 18:08:33 +0000 (18:08 +0000)]
Cleanup based on rnk's feedback.
llvm-svn: 235125
Sanjay Patel [Thu, 16 Apr 2015 17:52:13 +0000 (17:52 +0000)]
[X86, SSE] instcombine common cases of insertps intrinsics into shuffles
This is very similar to D8486 / r232852 (vperm2). If we treat insertps intrinsics
as shufflevectors, we can optimize them better.
I've left all but the full zero case of the zero mask variants out of this patch.
I don't think those can be converted into a single shuffle in all cases, but I'd
be happy to be proven wrong as I was for vperm2f128.
Either way, we'd need to support whatever sequence we come up with for those cases
in the backend before converting them here.
Differential Revision: http://reviews.llvm.org/D8833
llvm-svn: 235124
Chris Bieneman [Thu, 16 Apr 2015 17:40:51 +0000 (17:40 +0000)]
Fixing windows bots.
Third time's the try.
llvm-svn: 235123
Jim Ingham [Thu, 16 Apr 2015 17:32:27 +0000 (17:32 +0000)]
The last argument to CreateExceptionBreakpoint is "internal" not Hardware.
llvm-svn: 235122
Chris Bieneman [Thu, 16 Apr 2015 17:26:50 +0000 (17:26 +0000)]
Better fix to the windows conditional.
llvm-svn: 235121
Chris Bieneman [Thu, 16 Apr 2015 17:25:17 +0000 (17:25 +0000)]
Fix Windows bots.
Turns out Windows is special. All library installs are RUNTIME.
llvm-svn: 235120
Kevin Enderby [Thu, 16 Apr 2015 17:19:59 +0000 (17:19 +0000)]
For llvm-objdump added support for printing Objc1 32-bit runtime meta data
with the existing -objc-meta-data and -macho options for Mach-O files.
llvm-svn: 235119
Greg Clayton [Thu, 16 Apr 2015 17:13:34 +0000 (17:13 +0000)]
Add new virtual method for language runtime plug-ins:
virtual void
LanguageRuntime::ModulesDidLoad (const ModuleList &module_list);
Then reorganized how the objective C plug-in is notified so it will work for all LanguageRuntime subclasses.
llvm-svn: 235118
Reid Kleckner [Thu, 16 Apr 2015 17:02:23 +0000 (17:02 +0000)]
[WinEH] Handle a landingpad, resume, and cleanup all rolled into a BB
This happens a lot with simple cleanups after SimplifyCFG.
llvm-svn: 235117
Charlie Turner [Thu, 16 Apr 2015 17:01:23 +0000 (17:01 +0000)]
Editorial changes in the programmers manual.
VMCore was renamed to IR back in 2013. The relevant "core"
implementations were moved into the lib/IR directory at the same time.
llvm-svn: 235116
Duncan P. N. Exon Smith [Thu, 16 Apr 2015 16:56:29 +0000 (16:56 +0000)]
DebugInfo: Allow DebugLocs to be constructed from const
Allow `const`-qualified pointers to be used to construct `DebugLoc`s, as
a convenience.
llvm-svn: 235115
Chris Bieneman [Thu, 16 Apr 2015 16:56:22 +0000 (16:56 +0000)]
Fixing llvm-shlib's LLVM_DYLIB_EXPORT_ALL to work with Darwin fat binaries.
llvm-svn: 235114
Chris Bieneman [Thu, 16 Apr 2015 16:56:18 +0000 (16:56 +0000)]
Fixing a mis-use of the CMake install command.
The CMake install command is defined as:
install(TARGETS targets... [EXPORT <export-name>]
[[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE|
PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE]
[DESTINATION <dir>]
[INCLUDES DESTINATION [<dir> ...]]
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[COMPONENT <component>]
[OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP]
] [...])
This means it can only take one parameter from the set of RUNTIME, LIBRARY, or ARCHIVE. If you set more than one of these it seems to gobble up the extra arguments and ignore the COMPONENT argument.
This adds a check to only set LIBRARY or ARCHIVE based on whether or not the library being built is shared.
llvm-svn: 235113
Duncan P. N. Exon Smith [Thu, 16 Apr 2015 16:36:45 +0000 (16:36 +0000)]
DebugInfo: Update for LLVM API change in DIBuilder (r235111)
LLVM r235111 changed the `DIBuilder` API to stop using `DIDescriptor`
and its subclasses. Rolled into this was some tightening up of types:
- Scopes: `DIDescriptor` => `MDScope*`.
- Generic debug nodes: `DIDescriptor` => `DebugNode*`.
- Subroutine types: `DICompositeType` => `MDSubroutineType*`.
- Composite types: `DICompositeType` => `MDCompositeType*`.
Note that `DIDescriptor` wraps `MDNode`, and `DICompositeType` wraps
`MDCompositeTypeBase`.
It's this new type strictness that requires changes here.
llvm-svn: 235112
Duncan P. N. Exon Smith [Thu, 16 Apr 2015 16:36:23 +0000 (16:36 +0000)]
DebugInfo: Remove DIDescriptor from the DIBuilder API
As a step toward killing `DIDescriptor` and its subclasses, remove it
from the `DIBuilder` API. Replace the subclasses with appropriate
pointers from the new debug info hierarchy. There are a couple of
possible surprises in type choices for out-of-tree frontends:
- Subroutine types: `MDSubroutineType`, not `MDCompositeTypeBase`.
- Composite types: `MDCompositeType`, not `MDCompositeTypeBase`.
- Scopes: `MDScope`, not `MDNode`.
- Generic debug info nodes: `DebugNode`, not `MDNode`.
This is part of PR23080.
llvm-svn: 235111
Vladimir Sukharev [Thu, 16 Apr 2015 15:53:09 +0000 (15:53 +0000)]
[AArch64] Add v8.1a architecture
Add support for AArch64 v8.1 architecture. Briefly it is described on http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development
Reviewers: jmolloy
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8493
llvm-svn: 235110
Colin Riley [Thu, 16 Apr 2015 15:51:33 +0000 (15:51 +0000)]
Adds lldb support for querying the register mapping from gdbserver remote targets using qXfer:features:read packet. Only enabled if libxml2 enabled in build.
Differential Revision: http://reviews.llvm.org/D8999
llvm-svn: 235109
Hans Wennborg [Thu, 16 Apr 2015 15:43:26 +0000 (15:43 +0000)]
Revert the switch lowering change (r235101, r235103, r235106)
Looks like it broke the sanitizer-ppc64-linux1 build. Reverting for now.
llvm-svn: 235108
Vladimir Sukharev [Thu, 16 Apr 2015 15:38:58 +0000 (15:38 +0000)]
[AArch64] Add v8.1a "Virtualization Host Extensions"
Reviewers: t.p.northover
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8500
Patch by: Tom Coxon
llvm-svn: 235107
Hans Wennborg [Thu, 16 Apr 2015 15:35:44 +0000 (15:35 +0000)]
Add a triple to test/DebugInfo/unconditional-branch.ll (PR23252)
This started failing on Windows after my switch lowering change in r235101.
I suspect the error is unrelated, so adding a triple to pacify it
until it can be fixed. See the PR for details.
llvm-svn: 235106
Vladimir Sukharev [Thu, 16 Apr 2015 15:30:43 +0000 (15:30 +0000)]
[AArch64] Add v8.1a "Limited Ordering Regions" extension
Reviewers: t.p.northover
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8499
Patch by: Tom Coxon
llvm-svn: 235105
Vladimir Sukharev [Thu, 16 Apr 2015 15:20:51 +0000 (15:20 +0000)]
[AArch64] Add v8.1a "Privileged Access Never" extension
Reviewers: jmolloy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8498
llvm-svn: 235104
Hans Wennborg [Thu, 16 Apr 2015 15:09:33 +0000 (15:09 +0000)]
Add a triple to switch.ll test.
llvm-svn: 235103
Vladimir Sukharev [Thu, 16 Apr 2015 15:01:20 +0000 (15:01 +0000)]
[AArch64] Handle Cyclone-specific register in common way
Reviewers: jmolloy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8584
Patch by: Tom Coxon
llvm-svn: 235102
Hans Wennborg [Thu, 16 Apr 2015 14:49:23 +0000 (14:49 +0000)]
Switch lowering: extract jump tables and bit tests before building binary tree (PR22262)
This is a major rewrite of the SelectionDAG switch lowering. The previous code
would lower switches as a binary tre, discovering clusters of cases
suitable for lowering by jump tables or bit tests as it went along. To increase
the likelihood of finding jump tables, the binary tree pivot was selected to
maximize case density on both sides of the pivot.
By not selecting the pivot in the middle, the binary trees would not always
be balanced, leading to performance problems in the generated code.
This patch rewrites the lowering to search for clusters of cases
suitable for jump tables or bit tests first, and then builds the binary
tree around those clusters. This way, the binary tree will always be balanced.
This has the added benefit of decoupling the different aspects of the lowering:
tree building and jump table or bit tests finding are now easier to tweak
separately.
For example, this will enable us to balance the tree based on profile info
in the future.
The algorithm for finding jump tables is O(n^2), whereas the previous algorithm
was O(n log n) for common cases, and quadratic only in the worst-case. This
doesn't seem to be major problem in practice, e.g. compiling a file consisting
of a 10k-case switch was only 30% slower, and such large switches should be rare
in practice. Compiling e.g. gcc.c showed no compile-time difference. If this
does turn out to be a problem, we could limit the search space of the algorithm.
This commit also disables all optimizations during switch lowering in -O0.
Differential Revision: http://reviews.llvm.org/D8649
llvm-svn: 235101
Pavel Labath [Thu, 16 Apr 2015 14:47:01 +0000 (14:47 +0000)]
XFAIL a test in TestGdbRemoteRegisterState.py on linux to stabilize build bot
llvm-svn: 235100
Vladimir Sukharev [Thu, 16 Apr 2015 14:36:13 +0000 (14:36 +0000)]
[AArch64] Follow-up to: Refactor AArch64NamedImmMapper to become dependent on subtarget features
Fixed compilation with clang on some buildbots with "-Werror -Wmissing-field-initializers"
Related to: http://reviews.llvm.org/rL235089
llvm-svn: 235099
Tamas Berghammer [Thu, 16 Apr 2015 14:06:18 +0000 (14:06 +0000)]
Fix thumb symbol value fixup in ObjectFileELF
llvm-svn: 235098
Tamas Berghammer [Thu, 16 Apr 2015 14:06:15 +0000 (14:06 +0000)]
Fix printing of the failure address in NativeThreadLinux
llvm-svn: 235097
Alexey Bataev [Thu, 16 Apr 2015 13:49:42 +0000 (13:49 +0000)]
[OPENMP] Fix for checking of data-sharing attributes for canonical var decls only.
Currently checks for active data-sharing attributes for variables are performed for found var decls. Instead these checks must be performed for canonical decls of these variables to avoid possible troubles with with the differently qualified re-declarations of the same variable, for example:
namespace A { int x; }
namespace B { using A::x; }
Both A::x and B::x actually reference the same object A::x and this fact must be taken into account during data-sharing attributes analysis.
llvm-svn: 235096
Toma Tabacu [Thu, 16 Apr 2015 13:37:32 +0000 (13:37 +0000)]
[mips] [IAS] Preserve microMIPS label marking for objects when assigning.
Summary: Previously, this was only happening for functions, but because of .insn, objects can also be marked now.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8007
llvm-svn: 235095
Aaron Ballman [Thu, 16 Apr 2015 13:29:36 +0000 (13:29 +0000)]
Silencing a -Wunused-but-set-variable warning; NFC.
llvm-svn: 235094
Pavel Labath [Thu, 16 Apr 2015 13:03:55 +0000 (13:03 +0000)]
XFAILing TestGdbRemoteAttach to stabilise linux build bot
also, deleting what appears to be a concatenation of a file with itself (How that compiled in the
first place?).
llvm-svn: 235093
Rafael Espindola [Thu, 16 Apr 2015 12:59:30 +0000 (12:59 +0000)]
Don't depend on the order relocations are written to a .o file.
llvm-svn: 235092
Benjamin Kramer [Thu, 16 Apr 2015 12:43:33 +0000 (12:43 +0000)]
[Mips] Use unique_ptr to manage ownership.
Required some tweaking of ValueMap to accommodate a move-only value
type. No functional change intended.
llvm-svn: 235091
Benjamin Kramer [Thu, 16 Apr 2015 12:43:07 +0000 (12:43 +0000)]
Make it obvious that we're iterating over a range of pointers.
Found by -Wrange-loop-analysis.
llvm-svn: 235090
Vladimir Sukharev [Thu, 16 Apr 2015 12:15:27 +0000 (12:15 +0000)]
[AArch64] Refactor AArch64NamedImmMapper to become dependent on subtarget features.
In order to introduce v8.1a-specific entities, Mappers should be aware of SubtargetFeatures available.
This patch introduces refactoring, that will then allow to easily introduce:
- v8.1-specific "pan" PState for PStateMapper (PAN extension)
- v8.1-specific sysregs for SysRegMapper (LOR,VHE extensions)
Reviewers: jmolloy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8496
Patch by Tom Coxon
llvm-svn: 235089
James Molloy [Thu, 16 Apr 2015 11:37:40 +0000 (11:37 +0000)]
[AArch64] Fix invalid use of references to BuildMI.
This was found in GCC PR65773 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65773).
We shouldn't be taking a reference to the temporary that BuildMI returns, we must copy it.
llvm-svn: 235088
Vladimir Sukharev [Thu, 16 Apr 2015 11:34:25 +0000 (11:34 +0000)]
[ARM] Add v8.1a "Privileged Access Never" extension
Reviewers: jmolloy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8504
llvm-svn: 235087
Andrey Churbanov [Thu, 16 Apr 2015 11:10:17 +0000 (11:10 +0000)]
updated copyright date to 2015
llvm-svn: 235086
Yaron Keren [Thu, 16 Apr 2015 10:53:22 +0000 (10:53 +0000)]
Update MCELFStreamer::reset() following r234714
and order fields according to declaration order.
llvm-svn: 235085
Toma Tabacu [Thu, 16 Apr 2015 09:53:47 +0000 (09:53 +0000)]
[mips] [IAS] Add support for the .insn directive.
Summary:
This assembler directive marks the current label as an instruction label in microMIPS and MIPS16.
This initial implementation works only for microMIPS.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8006
llvm-svn: 235084
Robert Flack [Thu, 16 Apr 2015 09:18:12 +0000 (09:18 +0000)]
Append to CFLAGS_EXTRAS and LD_EXTRAS when building cmdline.
When building the command-line for compilations during tests, append to
CFLAGS_EXTRAS and LD_EXTRAS to preserve switches set by the environment
(i.e. for cross compiling to test on another platform).
Test Plan:
TestCPP11EnumTypes.py passes testing from macosx -> linux remotely with cross
compiling args in CFLAGS_EXTRAS and LD_EXTRAS.
Differential Revision: http://reviews.llvm.org/D8942
llvm-svn: 235083
Pavel Labath [Thu, 16 Apr 2015 08:58:15 +0000 (08:58 +0000)]
Revert "[RuntimeDyldELF] Fold Placeholder into Addend"
This reverts commit
cbbeac14f0ddca71f6d8ff91cd05522bd23908e5.
llvm-svn: 235082