Commit Graph

197399 Commits

Author SHA1 Message Date
Andrew Kaylor f7118ae810 Fixing a bug with optimized catch-all handlers in WinEHPrepare
llvm-svn: 233439
2015-03-27 22:31:12 +00:00
Rui Ueyama a2ddf07f25 ELF: Do not use llvm::Optional for _maxPageSize.
Use of llvm::Optional seems useless here because we can set the
default value 0x1000 as an initial value to the varaible.
This patch also de-virtualize the accessor functions.

llvm-svn: 233438
2015-03-27 22:28:35 +00:00
Rui Ueyama c470444837 Fix comment style to follow more common style.
llvm-svn: 233437
2015-03-27 22:28:33 +00:00
Rui Ueyama e555684115 ELF: Make addSearchPath return void instead of bool.
No one uses return value of the member function, and return value
is always true. Returning a value doesn't make sense.
This patch also de-virtualize the fucntion.

llvm-svn: 233436
2015-03-27 22:20:21 +00:00
Rui Ueyama 9cced88c7a ELF: Remove redundant =delete.
Since we have a (protected) constructor having two parameters,
the default constructor is not defined even if we don't do =delete.

llvm-svn: 233435
2015-03-27 22:13:29 +00:00
Rui Ueyama b531fe33d5 ELF: Use C++11 non-member initialization.
llvm-svn: 233434
2015-03-27 22:10:29 +00:00
Rui Ueyama adef19778c Remove unused varaible.
llvm-svn: 233433
2015-03-27 22:06:37 +00:00
Duncan P. N. Exon Smith 49e6a70fe3 Verifier: Call verifyModule() from llc and opt
Change `llc` and `opt` to run `verifyModule()`.  This ensures that we
check the full module before `FunctionPass::doInitialization()` ever
gets called (I was getting crashes in `DwarfDebug` instead of verifier
failures when testing a WIP patch that checks operands of compile
units).  In `opt`, also move up debug-info-stripping so that it still
runs before verification.

There was a fair bit of broken code that was sitting in tree.
Interestingly, some were cases of a `select` that referred to itself in
`-instcombine` tests (apparently an intermediate result).  I split them
off to `*-noverify.ll` tests with RUN lines like this:

    opt < %s -S -disable-verify -instcombine | opt -S | FileCheck %s

This avoids verifying the input file (so we can get the broken code into
`-instcombine), but still verifies the output with a second call to
`opt` (to verify that `-instcombine` will clean it up like it should).

llvm-svn: 233432
2015-03-27 22:04:28 +00:00
Rui Ueyama 2d6d7efb00 PECOFF: Use C++11 non-static member initialization.
llvm-svn: 233431
2015-03-27 21:59:23 +00:00
Richard Smith d6aab59ad1 [modules] Allow a function template definition if we have a pre-existing but not visible definition of the same template.
llvm-svn: 233430
2015-03-27 21:57:41 +00:00
Akira Hatanaka afbac28bb3 Fix call to MCInstPrinter::printInst to pass MCSubtargetInfo.
The interface of this function was changed in r233411.

llvm-svn: 233429
2015-03-27 21:45:58 +00:00
Chris Bieneman abc8fb276a [CMake] Removing duplicates from the list of test suites to generate targets for.
Not doing this causes some headaches for users migrating from autoconf to CMake.

llvm-svn: 233428
2015-03-27 21:45:49 +00:00
Sanjay Patel f176566a00 fix typo and 80-col; NFC
llvm-svn: 233427
2015-03-27 21:45:18 +00:00
Chandler Carruth f089372c5c [Modules] Work around PR23030 again, in a different code path, where
I again added the "reasonable" assertions and they again fired during
a modules self-host.

This hopefully will un-break the self-host build bot. No test case handy
and adding one seems to have little or no value really.

llvm-svn: 233426
2015-03-27 21:40:58 +00:00
Richard Smith df5bf99d0b Add file forgotten from r233420.
llvm-svn: 233425
2015-03-27 21:40:57 +00:00
Rui Ueyama 89616adb0c Use override keyword instead of virtual.
llvm-svn: 233424
2015-03-27 21:39:15 +00:00
Rui Ueyama 988355c3ae Remove empty constructors.
llvm-svn: 233423
2015-03-27 21:39:13 +00:00
Rafael Espindola 44d5057e38 Add two small structs for readability in place of std::pair and std::tuple. NFC.
llvm-svn: 233422
2015-03-27 21:34:24 +00:00
Sean Callanan e802387476 Added a testcase that verifies that LLDB can load
Clang modules out of the Mac OS X SDK and use their
types/functions.

<rdar://problem/18802064>

llvm-svn: 233421
2015-03-27 21:21:22 +00:00
Richard Smith 0279375836 [modules] When merging class definitions, make the retained definition visible
if the merged definition is visible, and perform lookups into all merged copies
of the definition (not just for special members) so that we can complete the
redecl chains for members of the class.

llvm-svn: 233420
2015-03-27 21:16:39 +00:00
David Blaikie 87ca1b6e0c Constrain the type of a parameter now that callers without this constraint have been removed.
llvm-svn: 233419
2015-03-27 20:56:11 +00:00
Rui Ueyama 96278ff759 Fix formatting.
llvm-svn: 233418
2015-03-27 20:50:56 +00:00
Rui Ueyama 194c21209f Remove dead code.
I actually spend my time to understand this piece of code
and then realized that this is all dead.

llvm-svn: 233417
2015-03-27 20:50:54 +00:00
Adrian McCarthy b016b3cfea Fix lld command on Windows for many tests.
llvm-svn: 233416
2015-03-27 20:47:35 +00:00
Duncan P. N. Exon Smith 988a7f8b79 DebugInfo: Fix bad debug info for compile units and types
Fix debug info in these tests, which started failing with a WIP patch to
verify compile units and types.  The problems look like they were all
caused by bitrot.  They fell into these categories:

  - Using `!{i32 0}` instead of `!{}`.
  - Using `!{null}` instead of `!{}`.
  - Using `!MDExpression()` instead of `!{}`.
  - Using `!8` instead of `!{!8}`.
  - `file:` references that pointed at `MDCompileUnit`s instead of the
    same `MDFile` as the compile unit.
  - `file:` references that were numerically off-by-one or (off-by-ten).

llvm-svn: 233415
2015-03-27 20:46:33 +00:00
Ahmed Bougacha 91b959352c [R600/SI] Fix testcase check line.
Missing colon, instruction typo.

llvm-svn: 233414
2015-03-27 20:41:42 +00:00
Nick Lewycky 816e0eabb7 Add another sanity check for swapcontext, which is currently unsupported. Patch by Alexey Samsonov!
llvm-svn: 233413
2015-03-27 20:40:23 +00:00
Akira Hatanaka bceb2a5a1c [AArch64InstPrinter] Use the feature bits of the subtarget passed to the print
method.

This enables the instprinter to print a different system register name based on
the feature bits of the per-function subtarget. 

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

llvm-svn: 233412
2015-03-27 20:37:20 +00:00
Akira Hatanaka b46d0234a6 [MCInstPrinter] Enable MCInstPrinter to change its behavior based on the
per-function subtarget.

Currently, code-gen passes the default or generic subtarget to the constructors
of MCInstPrinter subclasses (see LLVMTargetMachine::addPassesToEmitFile), which
enables some targets (AArch64, ARM, and X86) to change their instprinter's
behavior based on the subtarget feature bits. Since the backend can now use
different subtargets for each function, instprinter has to be changed to use the
per-function subtarget rather than the default subtarget.

This patch takes the first step towards enabling instprinter to change its
behavior based on the per-function subtarget. It adds a bit "PassSubtarget" to
AsmWriter which tells table-gen to pass a reference to MCSubtargetInfo to the
various print methods table-gen auto-generates. 

I will follow up with changes to instprinters of AArch64, ARM, and X86.

llvm-svn: 233411
2015-03-27 20:36:02 +00:00
Ahmed Bougacha faf8065a99 [CodeGen] Don't attempt a tail-call with a non-forwarded explicit sret.
Tailcalls are only OK with forwarded sret pointers. With explicit sret,
one approximation is to check that the pointer isn't an Instruction, as
in that case it might point into some local memory (alloca). That's not
OK with tailcalls.

Explicit sret counterpart to r233409.
Differential Revison: http://reviews.llvm.org/D8510

llvm-svn: 233410
2015-03-27 20:35:49 +00:00
Ahmed Bougacha e2bd5d36b3 [CodeGen] Don't attempt a tail-call with implicit sret.
Tailcalls are only OK with forwarded sret pointers. With sret demotion,
they're not, as we'd have a pointer into a soon-to-be-dead stack frame.

Differential Revison: http://reviews.llvm.org/D8510

llvm-svn: 233409
2015-03-27 20:28:30 +00:00
David Blaikie dab893cb99 Fix -Wsign-compare warning
llvm-svn: 233408
2015-03-27 20:19:14 +00:00
Richard Smith 9a71c99844 [modules] Allow a function to be redefined if the old definition is not visible.
llvm-svn: 233407
2015-03-27 20:16:58 +00:00
Rui Ueyama 7b57cef5b0 ELF: Add override.
Some virtual member functions in ELF directory don't have
virtual type specifier. Add override to them.

llvm-svn: 233406
2015-03-27 20:15:46 +00:00
Rui Ueyama 674aaaa367 ELF: Remove blank doPreFlight and finalize member functions.
Make these functions non-pure and define the default implementations.

llvm-svn: 233405
2015-03-27 20:15:44 +00:00
David Blaikie e15dcbdf3e Recommit r233116 better: Remove a redundant instcombine involving bitcasts of geps of bitcasts
This just didn't need to be here at all, but the assertion I tried to
add wasn't appropriate either - the circumstance isn't impossible, it's
just not important to deal with it here - the gep-rooted version of this
instcombine will handle this case, we don't need to duplicate it for the
case where the gep happens to be used in a bitcast.

llvm-svn: 233404
2015-03-27 20:13:55 +00:00
Ed Maste a59d4db4f7 Move debug register output into __amd64__ (FreeBSD)
This debug register diagnostic is really only applicable to amd64 at
present.

llvm-svn: 233403
2015-03-27 20:11:37 +00:00
Rui Ueyama 52cd43e187 Fix formatting.
llvm-svn: 233402
2015-03-27 19:46:52 +00:00
Rui Ueyama 395b21e192 Rename all caps class names.
We have GOTAtom and PLTAtom classes because GOT or PLT are acronyms.
"Dynamic offset table" or "dynamic" are not acronyms.

llvm-svn: 233401
2015-03-27 19:33:05 +00:00
Rui Ueyama 4f694c873a Remove this->.
llvm-svn: 233400
2015-03-27 19:33:02 +00:00
Marek Olsak 2a1c9d00b9 R600/SI: Fix VOP2 VI encoding
Broken by "R600/SI: Refactor VOP2 instruction defs".

llvm-svn: 233399
2015-03-27 19:10:06 +00:00
Rafael Espindola d053d20d0d Revert "Don't use unique section names by default if using the integrated as."
This reverts commit r233393 while a debug a bot failure.

llvm-svn: 233398
2015-03-27 19:01:14 +00:00
Anna Zaks bf28d3aa33 [asan] Speed up isInterestingAlloca check
We make many redundant calls to isInterestingAlloca in the AddressSanitzier
pass. This is especially inefficient for allocas that have many uses. Let's
cache the results to speed up compilation.

The compile time improvements depend on the input. I did not see much
difference on benchmarks; however, I have a test case where compile time
goes from minutes to under a second.

llvm-svn: 233397
2015-03-27 18:52:01 +00:00
Alexei Starovoitov 13cf2cc405 [bpf] add support for bpf pseudo instruction
Expose bpf pseudo load instruction via intrinsic. It is used by front-ends that
can encode file descriptors directly into IR instead of relying on relocations.

llvm-svn: 233396
2015-03-27 18:51:42 +00:00
Quentin Colombet 2e27df717a [RegisterCoalescer] Refine the terminal rule to still consider the terminal
nodes.
When a node is terminal it is pushed at the end of the list of the copies to
coalesce instead of being completely ignored. In effect, this reduces its
priority over non-terminal nodes.

Because of that, we do not miss the rematerialization opportunities, nor the
copies that can be merged with more complex, than the terminal rule,
interference checks.

Related to PR22768.

llvm-svn: 233395
2015-03-27 18:37:15 +00:00
Duncan P. N. Exon Smith e2c61d9eec LLParser: Require non-null scope for MDLocation and MDLocalVariable
Change `LLParser` to require a non-null `scope:` field for both
`MDLocation` and `MDLocalVariable`.  There's no need to wait for the
verifier for this check.  This also allows their `::getImpl()` methods
to assert that the incoming scope is non-null.

llvm-svn: 233394
2015-03-27 17:56:39 +00:00
Rafael Espindola 463a0afe15 Don't use unique section names by default if using the integrated as.
This saves some IO and ccache space by not creating long section names. It
should work with every ELF linker.

llvm-svn: 233393
2015-03-27 17:55:23 +00:00
Yaron Keren 75e0c4b060 Remove superfluous .str() and replace std::string concatenation with Twine.
llvm-svn: 233392
2015-03-27 17:51:30 +00:00
Benjamin Kramer 6dcddc21f8 Mark DR777 only as fixed in clang SVN.
llvm-svn: 233391
2015-03-27 17:38:35 +00:00
Adrian Prantl c2401ddf84 Add a -raw option to the -section mode of llvm-objdump.
llvm-svn: 233390
2015-03-27 17:31:15 +00:00