platform/upstream/llvm.git
9 years agoSmall cleanup in ARMFastISel initialization.
Eric Christopher [Thu, 29 Jan 2015 00:19:37 +0000 (00:19 +0000)]
Small cleanup in ARMFastISel initialization.

llvm-svn: 227400

9 years agoMigrate ARM except for TTI, AsmPrinter, and frame lowering
Eric Christopher [Thu, 29 Jan 2015 00:19:33 +0000 (00:19 +0000)]
Migrate ARM except for TTI, AsmPrinter, and frame lowering
away from getSubtargetImpl.

llvm-svn: 227399

9 years agoAdd nullptr checks for TargetSelectionDAGInfo in SelectionDAG.
Manuel Jacob [Wed, 28 Jan 2015 23:50:40 +0000 (23:50 +0000)]
Add nullptr checks for TargetSelectionDAGInfo in SelectionDAG.

TSI is not guaranteed be non-null in SelectionDAG.

llvm-svn: 227397

9 years ago[fuzzer] add option -save_minimized_corpus
Kostya Serebryany [Wed, 28 Jan 2015 23:48:39 +0000 (23:48 +0000)]
[fuzzer] add option -save_minimized_corpus

llvm-svn: 227395

9 years agoFor the --be8 flag, check explicitly for pre-v7 / pre-v6m cores.
Joerg Sonnenberger [Wed, 28 Jan 2015 23:30:39 +0000 (23:30 +0000)]
For the --be8 flag, check explicitly for pre-v7 / pre-v6m cores.
Those used the old Big Endian support on ARM and don't need flags.
Refactor the logic in a separate common function, which also looks at
-march. Add corresponding logic for the Linux toolchain.

llvm-svn: 227393

9 years ago[clang] Use -android environment for all compiler-rt libs.
Dan Albert [Wed, 28 Jan 2015 23:23:36 +0000 (23:23 +0000)]
[clang] Use -android environment for all compiler-rt libs.

Summary:
This was already done for the sanitizers, but it needs to be done for
the profile and builtin libs as well.

Reviewers: srhines, timmurray, eugenis, samsonov

Reviewed By: samsonov

Subscribers: compnerd, cfe-commits

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

llvm-svn: 227392

9 years ago[LPM] Fix the PPC attribute to be spelled 'global-dynamic'. This should
Chandler Carruth [Wed, 28 Jan 2015 23:10:57 +0000 (23:10 +0000)]
[LPM] Fix the PPC attribute to be spelled 'global-dynamic'. This should
let the build bot make finish compiling stage2.

llvm-svn: 227391

9 years agoTeach SplitBlockPredecessors how to handle landingpad blocks.
Philip Reames [Wed, 28 Jan 2015 23:06:47 +0000 (23:06 +0000)]
Teach SplitBlockPredecessors how to handle landingpad blocks.

Patch by: Igor Laevsky <igor@azulsystems.com>

"Currently SplitBlockPredecessors generates incorrect code in case if basic block we are going to split has a landingpad. Also seems like it is fairly common case among it's users to conditionally call either SplitBlockPredecessors or SplitLandingPadPredecessors. Because of this I think it is reasonable to add this condition directly into SplitBlockPredecessors."

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

llvm-svn: 227390

9 years agoAdd lit-style tests for the Fuzzer library
Kostya Serebryany [Wed, 28 Jan 2015 22:49:25 +0000 (22:49 +0000)]
Add lit-style tests for the Fuzzer library

Summary: Add test targets and the lit-style runner.

Test Plan: Run the tests on bot.

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

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

llvm-svn: 227389

9 years agoNFC. Migrating clang-tools-extra to the cl::HideUnrelatedOptions API.
Chris Bieneman [Wed, 28 Jan 2015 22:45:26 +0000 (22:45 +0000)]
NFC. Migrating clang-tools-extra to the cl::HideUnrelatedOptions API.

llvm-svn: 227388

9 years ago[sanitizer] allow to reset the bb/edge coverage data inside the process while it...
Kostya Serebryany [Wed, 28 Jan 2015 22:39:44 +0000 (22:39 +0000)]
[sanitizer] allow to reset the bb/edge coverage data inside the process while it is running (single-threaded). Also expose the current coverage set to the process.

llvm-svn: 227387

9 years agofix typos; NFC
Sanjay Patel [Wed, 28 Jan 2015 22:37:32 +0000 (22:37 +0000)]
fix typos; NFC

llvm-svn: 227386

9 years agoBuild fix for Visual Studio. NFC.
Chris Bieneman [Wed, 28 Jan 2015 22:25:00 +0000 (22:25 +0000)]
Build fix for Visual Studio. NFC.

llvm-svn: 227385

9 years agoFix for PR22061 by K-ballo
Marshall Clow [Wed, 28 Jan 2015 22:22:35 +0000 (22:22 +0000)]
Fix for PR22061 by K-ballo

llvm-svn: 227384

9 years agoAdd logic to ClangASTType and SBType to discover information about vector types
Enrico Granata [Wed, 28 Jan 2015 22:18:02 +0000 (22:18 +0000)]
Add logic to ClangASTType and SBType to discover information about vector types

llvm-svn: 227383

9 years ago[dsymutil] Gather the DIE tree child->parent relationships.
Frederic Riss [Wed, 28 Jan 2015 22:15:14 +0000 (22:15 +0000)]
[dsymutil] Gather the DIE tree child->parent relationships.

The libDebugInfo DIE parsing doesn't store these relationships, we have to
recompute them. This commit introduces the CompileUnit bookkeeping class to
store this data. It will be expanded with more fields in the future.

No tests as this produces no visible output.

llvm-svn: 227382

9 years agoAdd DWARFUnit::getNumDIEs() and getDIEIndex()
Frederic Riss [Wed, 28 Jan 2015 22:15:07 +0000 (22:15 +0000)]
Add DWARFUnit::getNumDIEs() and getDIEIndex()

Parsed DIEs are stored in a vector and that makes it easy to get their
indices. Having easy access to a DIE's index makes it possible to use
arrays or vectors to efficiently store/access DIE related information.

There's no test for that new functionality (I don't see how to test
it standalone), but it'll be used in a subsequent dsymutil commit.

llvm-svn: 227381

9 years agoFixed the failing test:
Greg Clayton [Wed, 28 Jan 2015 22:08:17 +0000 (22:08 +0000)]
Fixed the failing test:

./dotest.py -A x86_64 -C clang -v -t  -f TestImageListMultiArchitecture.test_image_list_shows_multiple_architectures

The problem was that if the platform wasn't compatible with the current file in the "target create" command, it wasn't finding a platform that was like it used to.

Also, the currently selected platform was being used upload the file _before_ the target was created which was incorrect as "target create a.out" might switch platforms if its architecture doesn't match, so I moved the uploading to happen after the target was created so we use the right platform (the one in the target, not the selected one).

llvm-svn: 227380

9 years ago[Hexagon] Updating several V5 intrinsics and adding FP tests.
Colin LeMahieu [Wed, 28 Jan 2015 22:08:16 +0000 (22:08 +0000)]
[Hexagon] Updating several V5 intrinsics and adding FP tests.

llvm-svn: 227379

9 years agoCXX [qoi]. Prevent a crash when initializer expression is
Fariborz Jahanian [Wed, 28 Jan 2015 22:08:10 +0000 (22:08 +0000)]
CXX [qoi]. Prevent a crash when initializer expression is
invalid when trying to create temporary copy of the invalid
initializer. rdar://19109967

llvm-svn: 227378

9 years agoPR22367: Don't forget to create a CXXFunctionalCastExpr around
Richard Smith [Wed, 28 Jan 2015 22:06:01 +0000 (22:06 +0000)]
PR22367: Don't forget to create a CXXFunctionalCastExpr around
list-initialization that gets converted to some form other than an
InitListExpr. CXXTemporaryObjectExpr is a special case here, because it
represents a fused CXXFunctionalCastExpr + CXXConstructExpr. That, in
itself, is probably a design error...

llvm-svn: 227377

9 years agoSpelling fixes. NFC.
Simon Pilgrim [Wed, 28 Jan 2015 22:03:52 +0000 (22:03 +0000)]
Spelling fixes. NFC.

llvm-svn: 227376

9 years agoLine endings fix. NFC.
Simon Pilgrim [Wed, 28 Jan 2015 21:56:52 +0000 (21:56 +0000)]
Line endings fix. NFC.

llvm-svn: 227374

9 years ago[mips][microMIPS] Implement SWM and LWM aliases
Zoran Jovanovic [Wed, 28 Jan 2015 21:52:27 +0000 (21:52 +0000)]
[mips][microMIPS] Implement SWM and LWM aliases
Differential Revision: http://reviews.llvm.org/D5820

llvm-svn: 227373

9 years agoUpdated tools to match r227345 which changed the getRegisteredOptions method
Pete Cooper [Wed, 28 Jan 2015 21:34:05 +0000 (21:34 +0000)]
Updated tools to match r227345 which changed the getRegisteredOptions method

llvm-svn: 227372

9 years agoPR 17456
Nathan Sidwell [Wed, 28 Jan 2015 21:31:26 +0000 (21:31 +0000)]
PR 17456
More helpful diagnostic on casts between unrelated class hierarchies.

llvm-svn: 227371

9 years agoWe had two identical files named 'MoveOnly.h' in the test suite. Move one to support...
Marshall Clow [Wed, 28 Jan 2015 21:22:53 +0000 (21:22 +0000)]
We had two identical files named 'MoveOnly.h' in the test suite. Move one to support/, remove the other, and update all the tests that included them. No functionality change.

llvm-svn: 227370

9 years agoELF: s/diagnostics/diag/
Rui Ueyama [Wed, 28 Jan 2015 21:20:28 +0000 (21:20 +0000)]
ELF: s/diagnostics/diag/

We use a variable name "diag" in many other places and I think
it's preferred because of its length.

llvm-svn: 227369

9 years agoRevert a change from r222797 that is no longer needed and can cause
Kaelyn Takata [Wed, 28 Jan 2015 21:10:46 +0000 (21:10 +0000)]
Revert a change from r222797 that is no longer needed and can cause
infinite recursion.

Also guard against said infinite recursion by adding an assert that will
trigger if CorrectDelayedTyposInExpr is called before a previous call to
CorrectDelayedTyposInExpr returns (i.e. if the TreeTransform run by
CorrectDelayedTyposInExpr calls a sequence of methods that
end up calling CorrectDelayedTyposInExpr, as the new test case had done
prior to this commit). Fixes PR22292.

llvm-svn: 227368

9 years agoELF: add a unit test for --as-needed.
Rui Ueyama [Wed, 28 Jan 2015 21:01:24 +0000 (21:01 +0000)]
ELF: add a unit test for --as-needed.

llvm-svn: 227367

9 years agoFixed compiler warnings for functions that weren't marked virtual and the functions...
Greg Clayton [Wed, 28 Jan 2015 20:47:27 +0000 (20:47 +0000)]
Fixed compiler warnings for functions that weren't marked virtual and the functions didn't have "override" on them.

llvm-svn: 227366

9 years agoRemoved some tabs that snuck into the test suite. No functionality change
Marshall Clow [Wed, 28 Jan 2015 20:26:11 +0000 (20:26 +0000)]
Removed some tabs that snuck into the test suite. No functionality change

llvm-svn: 227363

9 years agoRemove support for pnaclcall attribute
Derek Schuff [Wed, 28 Jan 2015 20:24:52 +0000 (20:24 +0000)]
Remove support for pnaclcall attribute

Summary:
It was used for interoperability with PNaCl's calling conventions, but
it's no longer needed.

Also Remove NaCl*ABIInfo which just existed to delegate to either the portable
or native ABIInfo, and remove checkCallingConvention which was now a no-op
override.

Reviewers: jvoung

Subscribers: jfb, llvm-commits

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

llvm-svn: 227362

9 years agoFix layering violation: include/clang/Basic/PlistSupport.h should not include
Richard Smith [Wed, 28 Jan 2015 20:14:54 +0000 (20:14 +0000)]
Fix layering violation: include/clang/Basic/PlistSupport.h should not include
files from include/clang/Lex. Clean up module map.

llvm-svn: 227361

9 years agoFix PR22366. When move-constructing an associative container and explicitly passing...
Marshall Clow [Wed, 28 Jan 2015 19:54:25 +0000 (19:54 +0000)]
Fix PR22366. When move-constructing an associative container and explicitly passing an allocator that compares different, we were not calling the destructor of the elements in the moved-from container.

llvm-svn: 227359

9 years ago[fuzzer] instructions for building/running clang-format-fuzzer
Kostya Serebryany [Wed, 28 Jan 2015 19:51:58 +0000 (19:51 +0000)]
[fuzzer] instructions for building/running clang-format-fuzzer

llvm-svn: 227357

9 years agoDebugInfo: Attribute implicit boolean tests to the expression being tested, not to...
David Blaikie [Wed, 28 Jan 2015 19:50:09 +0000 (19:50 +0000)]
DebugInfo: Attribute implicit boolean tests to the expression being tested, not to the outer use of that expression.

This is half a fix for a GDB test suite failure that expects to start at
'a' in the following code:

  void func(int a)
    if (a
        &&
b)
...

But instead, without this change, the comparison was assigned to '&&'
(well, worse actually - because there was a chained 'a && b && c' and it
was assigned to the second '&&' because of a recursive application of
this bug) and then the load folded into the comparison so breaking on
the function started at '&&' instead of 'a'.

The other part of this needs to be fixed in LLVM where it's ignoring the
location of the icmp and instead using the location of the branch
instruction.

The fix to the conditional operator is actually a no-op currently,
because the conditional operator's location coincides with 'a' (the
start of the conditional expression) but should probably be '?' instead.
See the FIXME in the test case that mentions the ARCMigration tool
failures when I tried to make that change.

llvm-svn: 227356

9 years agoinvert check for less indentation; use local vars to reduce duplication; NFC
Sanjay Patel [Wed, 28 Jan 2015 19:44:21 +0000 (19:44 +0000)]
invert check for less indentation; use local vars to reduce duplication; NFC

llvm-svn: 227355

9 years agoAdd clang-format-fuzzer target
Kostya Serebryany [Wed, 28 Jan 2015 19:39:18 +0000 (19:39 +0000)]
Add clang-format-fuzzer target

Summary:
This adds clang-format-fuzzer binary,
which depends on the Fuzzer lib,
see http://reviews.llvm.org/D7184

This fuzer has found ~15 bugs so far, and I hope to set up a bot for it.

Test Plan: run on a bot.

Reviewers: samsonov, djasper

Reviewed By: djasper

Subscribers: curdeius, cfe-commits

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

llvm-svn: 227354

9 years ago[Hexagon] Updating many V4 intrinsic patterns. Adding missing instruction and deleti...
Colin LeMahieu [Wed, 28 Jan 2015 19:39:09 +0000 (19:39 +0000)]
[Hexagon] Updating many V4 intrinsic patterns.  Adding missing instruction and deleting unused classes.

llvm-svn: 227353

9 years ago[LPM] Try to work around a bug with local-dynamic TLS on PowerPC 64.
Chandler Carruth [Wed, 28 Jan 2015 19:29:22 +0000 (19:29 +0000)]
[LPM] Try to work around a bug with local-dynamic TLS on PowerPC 64.

Sadly, this precludes optimizing it down to initial-exec or local-exec
when statically linking, and in general makes the code slower on PPC 64,
but there's nothing else for it until we can arrange to produce the
correct bits for the linker.

Lots of thanks to Ulirch for tracking this down and Bill for working on
the long-term fix to LLVM so that we can relegate this to old host
clang versions.

I'll be watching the PPC build bots to make sure this effectively
revives them.

llvm-svn: 227352

9 years agoRemove gc.root's performCustomLowering
Philip Reames [Wed, 28 Jan 2015 19:28:03 +0000 (19:28 +0000)]
Remove gc.root's performCustomLowering

This is a refactoring to restructure the single user of performCustomLowering as a specific lowering pass and remove the custom lowering hook entirely.

Before this change, the LowerIntrinsics pass (note to self: rename!) was essentially acting as a pass manager, but without being structured in terms of passes. Instead, it proxied calls to a set of GCStrategies internally. This adds a lot of conceptual complexity (i.e. GCStrategies are stateful!) for very little benefit. Since there's been interest in keeping the ShadowStackGC working, I extracting it's custom lowering pass into a dedicated pass and just added that to the pass order. It will only run for functions which opt-in to that gc.

I wasn't able to find an easy way to preserve the runtime registration of custom lowering functionality. Given that no user of this exists that I'm aware of, I made the choice to just remove that. If someone really cares, we can look at restoring it via dynamic pass registration in the future.

Note that despite the large diff, none of the lowering code actual changes. I added the framing needed to make it a pass and rename the class, but that's it.

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

llvm-svn: 227351

9 years agoHarden against the process pointer being null - this seems like it shouldn't happen...
Enrico Granata [Wed, 28 Jan 2015 19:23:51 +0000 (19:23 +0000)]
Harden against the process pointer being null - this seems like it shouldn't happen, except it did - by a user stopping the debugger while the variables view was refreshing

Fixes rdar://19599357

llvm-svn: 227350

9 years agoMoving AddLiteralOption's declaration higher up in the header to make gcc happy.
Chris Bieneman [Wed, 28 Jan 2015 19:17:09 +0000 (19:17 +0000)]
Moving AddLiteralOption's declaration higher up in the header to make gcc happy.

llvm-svn: 227348

9 years ago[Hexagon] Adding XTYPE/MPY intrinsic tests and some missing multiply instructions.
Colin LeMahieu [Wed, 28 Jan 2015 19:16:17 +0000 (19:16 +0000)]
[Hexagon] Adding XTYPE/MPY intrinsic tests and some missing multiply instructions.

llvm-svn: 227347

9 years agoRefactoring llvm command line parsing and option registration.
Chris Bieneman [Wed, 28 Jan 2015 19:00:25 +0000 (19:00 +0000)]
Refactoring llvm command line parsing and option registration.

Summary:
The primary goal of this patch is to remove the need for MarkOptionsChanged(). That goal is accomplished by having addOption and removeOption properly sort the options.

This patch puts the new add and remove functionality on a CommandLineParser class that is a placeholder. Some of the functionality in this class will need to be merged into the OptionRegistry, and other bits can hopefully be in a better abstraction.

This patch also removes the RegisteredOptionList global, and the need for cl::Option objects to be linked list nodes.

The changes in CommandLineTest.cpp are required because these changes shift when we validate that options are not duplicated. Before this change duplicate options were only found during certain cl API calls (like cl::ParseCommandLine). With this change duplicate options are found during option construction.

Reviewers: dexonsmith, chandlerc, pete

Reviewed By: pete

Subscribers: pete, majnemer, llvm-commits

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

llvm-svn: 227345

9 years agoTestcase for PS4 target defaults (from r227215 and r227219)
Filipe Cabecinhas [Wed, 28 Jan 2015 18:49:45 +0000 (18:49 +0000)]
Testcase for PS4 target defaults (from r227215 and r227219)

llvm-svn: 227343

9 years agoAs promised, make this more efficient by only doing all the busy work when necessary
Enrico Granata [Wed, 28 Jan 2015 18:45:28 +0000 (18:45 +0000)]
As promised, make this more efficient by only doing all the busy work when necessary

llvm-svn: 227342

9 years agoAdd a unit test for LinkerScript.
Rui Ueyama [Wed, 28 Jan 2015 18:38:50 +0000 (18:38 +0000)]
Add a unit test for LinkerScript.

llvm-svn: 227341

9 years agoAssume code ownership for the PS4 to ensure patches get reviewed, per the Developer...
Alex Rosenberg [Wed, 28 Jan 2015 18:33:39 +0000 (18:33 +0000)]
Assume code ownership for the PS4 to ensure patches get reviewed, per the Developer Policy.

llvm-svn: 227340

9 years agoFix build breakage caused by memory leaks in llvm-c-test
Bjorn Steinbrink [Wed, 28 Jan 2015 18:32:31 +0000 (18:32 +0000)]
Fix build breakage caused by memory leaks in llvm-c-test

I accidently introduced those in r227319.

llvm-svn: 227339

9 years ago[Hexagon] Deleting a lot of old variants of intrinsics and updating references.
Colin LeMahieu [Wed, 28 Jan 2015 18:29:11 +0000 (18:29 +0000)]
[Hexagon] Deleting a lot of old variants of intrinsics and updating references.

llvm-svn: 227338

9 years ago[dsymutil] Add DwarfLinker class.
Frederic Riss [Wed, 28 Jan 2015 18:27:01 +0000 (18:27 +0000)]
[dsymutil] Add DwarfLinker class.

It's an empty shell for now. It's main method just opens the debug
map objects and parses their Dwarf info. Test that we at least do
that correctly.

llvm-svn: 227337

9 years agoEnable pragma comment processing for PS4. Original patch by Yunzhong Gao!
Alex Rosenberg [Wed, 28 Jan 2015 18:26:15 +0000 (18:26 +0000)]
Enable pragma comment processing for PS4. Original patch by Yunzhong Gao!

llvm-svn: 227336

9 years ago[Hexagon] Converting XTYPE/BIT intrinsic patterns and adding tests.
Colin LeMahieu [Wed, 28 Jan 2015 18:06:23 +0000 (18:06 +0000)]
[Hexagon] Converting XTYPE/BIT intrinsic patterns and adding tests.

llvm-svn: 227335

9 years agouse SDValue methods directly instead of getNode()->* ; NFCI
Sanjay Patel [Wed, 28 Jan 2015 18:01:31 +0000 (18:01 +0000)]
use SDValue methods directly instead of getNode()->* ; NFCI

llvm-svn: 227334

9 years agoSimplify code. NFC.
Rafael Espindola [Wed, 28 Jan 2015 17:54:19 +0000 (17:54 +0000)]
Simplify code. NFC.

llvm-svn: 227333

9 years ago[Hexagon] Replacing XTYPE/SHIFT intrinsic patternss. Adding tests and missing instru...
Colin LeMahieu [Wed, 28 Jan 2015 17:37:59 +0000 (17:37 +0000)]
[Hexagon] Replacing XTYPE/SHIFT intrinsic patternss.  Adding tests and missing instructions with tests.

llvm-svn: 227330

9 years agoLaunch lldb-gdbserver in same process group when launched remotely using lldb-platfor...
Oleksiy Vyalov [Wed, 28 Jan 2015 17:36:59 +0000 (17:36 +0000)]
Launch lldb-gdbserver in same process group when launched remotely using lldb-platform - commit on behalf of flackr.

http://reviews.llvm.org/D7211

llvm-svn: 227329

9 years agoFix indents on asan_symbolize.py's argument parsing code. No behavior change.
Nico Weber [Wed, 28 Jan 2015 17:29:57 +0000 (17:29 +0000)]
Fix indents on asan_symbolize.py's argument parsing code. No behavior change.

llvm-svn: 227327

9 years agoMake asan_symbolize.py not crash on Windows.
Nico Weber [Wed, 28 Jan 2015 17:28:04 +0000 (17:28 +0000)]
Make asan_symbolize.py not crash on Windows.

asan_symbolize.py isn't needed on Windows, but it's nice if asan has a unified
UI on all platforms. So rather than have asan_symolize.py die on startup due to
it importing modules that don't exist on Windows, let it just echo the input.

llvm-svn: 227326

9 years ago[mips][microMIPS] Implement LWGP instruction
Jozef Kolek [Wed, 28 Jan 2015 17:27:26 +0000 (17:27 +0000)]
[mips][microMIPS] Implement LWGP instruction

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

llvm-svn: 227325

9 years ago[Hexagon] Replacing intrinsics for halfword adds and max/min word/dword.
Colin LeMahieu [Wed, 28 Jan 2015 17:06:40 +0000 (17:06 +0000)]
[Hexagon] Replacing intrinsics for halfword adds and max/min word/dword.

llvm-svn: 227322

9 years ago[Hexagon] Replacing old intrinsic tests with organized versions that match the refere...
Colin LeMahieu [Wed, 28 Jan 2015 16:58:05 +0000 (16:58 +0000)]
[Hexagon] Replacing old intrinsic tests with organized versions that match the reference manual.

llvm-svn: 227321

9 years agoRemove PPC ELF target
Greg Fitzgerald [Wed, 28 Jan 2015 16:37:43 +0000 (16:37 +0000)]
Remove PPC ELF target

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

llvm-svn: 227320

9 years agoFix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodes
Bjorn Steinbrink [Wed, 28 Jan 2015 16:35:59 +0000 (16:35 +0000)]
Fix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodes

Summary:
MetadataAsValue uses a canonical format that strips the MDNode if it
contains only a single constant value. This triggers an assertion when
trying to cast the value to a MDNode.

Subscribers: llvm-commits

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

llvm-svn: 227319

9 years ago[ELFYAML] Provide explicit value for relocation addendums in the test
Simon Atanasyan [Wed, 28 Jan 2015 16:22:50 +0000 (16:22 +0000)]
[ELFYAML] Provide explicit value for relocation addendums in the test

The `Addend` is an optional field of the `Relocation` YAML record. But
we do not provide its default value while reading it from a YAML file
and so it might keep uninitialized.

I am going to fix the code by a separate commit. We might either make
this field mandatory (at least for .rela sections) or specify 0 as
a default value explicitly.

llvm-svn: 227318

9 years ago[x32] Change the condition from bitness to LP64 for TCRETURNdi64.
Michael Kuperstein [Wed, 28 Jan 2015 16:11:35 +0000 (16:11 +0000)]
[x32] Change the condition from bitness to LP64 for TCRETURNdi64.

TCRETURNmi64, which was mistakenly changed in r227307 will wait for another day.

llvm-svn: 227317

9 years agoR600: Move DataLayout to AMDGPUTargetMachine
Tom Stellard [Wed, 28 Jan 2015 16:04:26 +0000 (16:04 +0000)]
R600: Move DataLayout to AMDGPUTargetMachine

This is a follow up to r227113.

It is now required to use the amdgcn target for SI and newer GPUs.

llvm-svn: 227316

9 years agoR600: Use a Southern Islands GPU as the default for the amdgcn target
Tom Stellard [Wed, 28 Jan 2015 15:38:44 +0000 (15:38 +0000)]
R600: Use a Southern Islands GPU as the default for the amdgcn target

llvm-svn: 227315

9 years agoR600: Use a Southern Islands GPU as the default for the amdgcn target
Tom Stellard [Wed, 28 Jan 2015 15:38:42 +0000 (15:38 +0000)]
R600: Use a Southern Islands GPU as the default for the amdgcn target

llvm-svn: 227314

9 years agoFix typo (count correctly) in include/clang/AST/TypeNodes.def
Hal Finkel [Wed, 28 Jan 2015 15:11:18 +0000 (15:11 +0000)]
Fix typo (count correctly) in include/clang/AST/TypeNodes.def

Patch by Mingjie Xing.

llvm-svn: 227313

9 years agoPR 20146
Nathan Sidwell [Wed, 28 Jan 2015 14:48:39 +0000 (14:48 +0000)]
PR  20146
make new diagnostic an ExtWarn

llvm-svn: 227312

9 years agoCorrect the AggressiveAntiDepBreaker's handling of subregisters defining super registers
Hal Finkel [Wed, 28 Jan 2015 14:44:14 +0000 (14:44 +0000)]
Correct the AggressiveAntiDepBreaker's handling of subregisters defining super registers

As the AggressiveAntiDepBreaker iterated backward through a scheduling region,
we must leave super registers live through subregister definitions so that all
relevant subregister definitions are renamed together. The problem was that we
were also discarding sub-register use locations as the sub-registers are
redefined. The result is that we'd rename the super register along with some,
but not all, subregister definitions.

  R0_D = {R0_L, R1_L}
  R0_L = {R0_S, R1_S}

  %R0_L<def> = TRLi9 16, pred:8, pred:%noreg
  %R1_L<def> = LSRLrr %R1_L<kill>, %R0_S, pred:8, pred:%noreg
  %R0_L<def> = LSRLrr %R2_L, %R0_S, pred:8, pred:%noreg, %R0_L<imp-use,kill>
  %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
  %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
  %R4_D<def> = ASRDrr %R0_D<kill>, %R6_S

  Anti:   %R4_D<def> = ASRDrr %R0_D<kill>, %R6_S
   Def Groups: R4_D=g213->g215(via R4_S)->g214(via R4_L)->g216(via R5_S)->g216(via R4_L)->g217(via R5_L)
   Use Groups: R0_D=g0->g218(last-use) R1_L->g219(last-use) R6_S=g204->g220(last-use)
  Anti:   %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R0_L=g208->g209(via R0_S)->g218(via R0_D)->g210(via R1_S)->g210(via R0_D)
   Antidep reg: R0_L (real dependency)
   Use Groups: R0_L=g210->g224(last-use) R0_S->g225(last-use) R1_S->g226(last-use)
  Anti:   %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R1_L=g219->g210(via R0_D)
   Antidep reg: R1_L (real dependency)
   Use Groups: R1_L=g210->g229(last-use)
  Anti:   %R0_L<def> = LSRLrr %R2_L, %R0_S, pred:8, pred:%noreg, %R0_L<imp-use,kill>
   Def Groups: R0_L=g224->g225(via R0_S)->g210(via R0_D)->g226(via R1_S)->g226(via R0_D)
   Antidep reg: R0_L Use Groups: R2_L=g192 R0_S=g226->g230(last-use) R0_L=g226->g231(last-use) R1_S->g232(last-use)
  Anti:   %R1_L<def> = LSRLrr %R1_L<kill>, %R0_S, pred:8, pred:%noreg
   Def Groups: R1_L=g229->g226(via R0_D)
   Antidep reg: R1_L Use Groups: R1_L=g226->g233(last-use) R0_S=g230
  Anti:   %R0_L<def> = TRLi9 16, pred:8, pred:%noreg
   Def Groups: R0_L=g231->g230(via R0_S)->g226(via R0_D)->g232(via R1_S)->g232(via R0_D)
   Antidep reg: R0_L
   Rename Candidates for Group g232:
    R0_D: elcInt64Regs :: R0_D R1_D R2_D R3_D R4_D R5_D R8_D R9_D R10_D R11_D R12_D R13_D R14_D R15_D R16_D R17_D R18_D R19_D R20_D R21_D R22_D R23_D R24_D R25_D
    R0_L: elcIntRegs :: R0_L R1_L R2_L R3_L R4_L R5_L R8_L R9_L R10_L R11_L R12_L R13_L R14_L R15_L R16_L R17_L R18_L R19_L R20_L R21_L R22_L R23_L R24_L R25_L
    R0_S: elcShrtRegs elcShrtRegs :: R0_S R1_S R2_S R3_S R4_S R5_S R8_S R9_S R10_S R11_S R12_S R13_S R14_S R15_S R16_S R17_S R18_S R19_S R20_S R21_S R22_S R23_S R24_S R25_S
   Find Registers: [R12_D: R12_D R12_L R12_S]
   Breaking anti-dependence edge on R0_L: R0_D->R12_D(1 refs) R0_L->R12_L(2 refs) R0_S->R12_S(2 refs)
   Use Groups:
  ...

  %R12_L<def> = TRLi9 16, pred:8, pred:%noreg
  %R1_L<def> = LSRLrr %R1_L<kill>, %R12_S, pred:8, pred:%noreg
  %R0_L<def> = LSRLrr %R2_L<kill>, %R12_S, pred:8, pred:%noreg, %R12_L<imp-use>
  %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
  %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
  %R4_D<def> = ASRDrr %R12_D<kill>, %R6_S

With this change, we now produce:

  Anti:   %R4_D<def> = ASRDrr %R0_D<kill>, %R6_S
   Def Groups: R4_D=g213->g215(via R4_S)->g214(via R4_L)->g216(via R5_S)->g216(via R4_L)->g217(via R5_L)
   Use Groups: R0_D=g0->g218(last-use) R1_L->g219(last-use) R6_S=g204->g220(last-use)
  Anti:   %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R0_L=g208->g209(via R0_S)->g218(via R0_D)->g210(via R1_S)->g210(via R0_D)
   Antidep reg: R0_L (real dependency)
   Use Groups: R0_L=g210
  Anti:   %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R1_L=g219->g210(via R0_D)
   Antidep reg: R1_L (real dependency)
   Use Groups: R1_L=g210
  Anti:   %R0_L<def> = LSRLrr %R2_L, %R0_S, pred:8, pred:%noreg, %R0_L<imp-use,kill>
   Def Groups: R0_L=g210->g210(via R0_D)->g210(via R0_D)
   Antidep reg: R0_L Use Groups: R2_L=g192 R0_S=g210 R0_L=g210
  Anti:   %R1_L<def> = LSRLrr %R1_L<kill>, %R0_S, pred:8, pred:%noreg
   Def Groups: R1_L=g210->g210(via R0_D)
   Antidep reg: R1_L Use Groups: R1_L=g210 R0_S=g210
  Anti:   %R0_L<def> = TRLi9 16, pred:8, pred:%noreg
   Def Groups: R0_L=g210->g210(via R0_D)->g210(via R0_D)
   Antidep reg: R0_L
   Rename Candidates for Group g210:
    R0_D: elcInt64Regs :: R0_D R1_D R2_D R3_D R4_D R5_D R8_D R9_D R10_D R11_D R12_D R13_D R14_D R15_D R16_D R17_D R18_D R19_D R20_D R21_D R22_D R23_D R24_D R25_D
    R0_L: elcIntRegs elcIntAIRegs elcIntRegs elcIntRegs elcIntRegs elcIntRegs :: R0_L R1_L R2_L R3_L R4_L R5_L R8_L R9_L R10_L R11_L R12_L R13_L R14_L R15_L R16_L R17_L R18_L R19_L R20_L R21_L R22_L R23_L R24_L R25_L
    R1_L: elcIntRegs elcIntRegs elcIntRegs elcIntRegs elcIntRegs :: R0_L R1_L R2_L R3_L R4_L R5_L R8_L R9_L R10_L R11_L R12_L R13_L R14_L R15_L R16_L R17_L R18_L R19_L R20_L R21_L R22_L R23_L R24_L R25_L
    R0_S: elcShrtRegs elcShrtRegs :: R0_S R1_S R2_S R3_S R4_S R5_S R8_S R9_S R10_S R11_S R12_S R13_S R14_S R15_S R16_S R17_S R18_S R19_S R20_S R21_S R22_S R23_S R24_S R25_S
   Find Registers: [R12_D: R12_D R12_L R13_L R12_S]
   Breaking anti-dependence edge on R0_L: R0_D->R12_D(1 refs) R0_L->R12_L(7 refs) R1_L->R13_L(5 refs) R0_S->R12_S(2 refs)
   Use Groups:
  ...

  %R12_L<def> = TRLi9 16, pred:8, pred:%noreg
  %R13_L<def> = LSRLrr %R13_L<kill>, %R12_S, pred:8, pred:%noreg
  %R12_L<def> = LSRLrr %R2_L<kill>, %R12_S<kill>, pred:8, pred:%noreg, %R12_L<imp-use,kill>
  %R13_L<def> = ANDLri %R13_L<kill>, 2047, pred:8, pred:%noreg
  %R12_L<def> = ANDLri %R12_L<kill>, 2047, pred:8, pred:%noreg
  %R4_D<def> = ASRDrr %R12_D, %R6_S, %R12_L<imp-def>, %R12_S<imp-def>, %R13_S<imp-def>

As demonstrated by this example, this is also somewhat unfortunate, because
there is actually no need to rename the super register in this case (it is
fully covered by later subregister definitions), but we don't seem to track
enough information here to exploit that either.

Thanks to Daniil Troshkov for reporting the issue. The debug outputs in this
commit message are from Daniil.

llvm-svn: 227311

9 years agoAvoid testing for a particular choice of resource dir.
Sean Silva [Wed, 28 Jan 2015 14:19:08 +0000 (14:19 +0000)]
Avoid testing for a particular choice of resource dir.

Without this patch, this test was accidentally testing that
CLANG_RESOURCE_DIR, CLANG_LIBDIR_SUFFIX, and CLANG_VERSION_STRING
were set to a particular set of values.

The test was also getting pretty hairy since it was attempting to craft
a regular expression that covered "all" possible combinations of
settings for these configure-time constants.

Clean it up by directly capturing the resource directory in a FileCheck
variable.

llvm-svn: 227310

9 years agoImproves overload completion result chunks.
Francisco Lopes da Silva [Wed, 28 Jan 2015 14:17:22 +0000 (14:17 +0000)]
Improves overload completion result chunks.

The code building the code completion string for overloads was providing
less detail compared to the one building completion strings for function
declarations. There was no information about optionals and no information
about what's a parameter and what's a function identifier, everything
besides ResultType, CurrentParameter and special characters was classified
as Text.

This makes code completion strings for overload candidates to follow a
pattern very similar, but not identical, to the one in use for function
declarations:

 - return type chunk: ResultType
 - function identifier chunk: Text
 - parameter chunks: Placeholder
 - optional parameter chunks: Optional
 - current parameter chunk: CurrentParameter

llvm-svn: 227309

9 years ago[X86] Reduce some 32-bit imuls into lea + shl
Michael Kuperstein [Wed, 28 Jan 2015 14:08:22 +0000 (14:08 +0000)]
[X86] Reduce some 32-bit imuls into lea + shl

Reduce integer multiplication by a constant of the form k*2^c, where k is in {3,5,9} into a lea + shl. Previously it was only done for imulq on 64-bit platforms, but it makes sense for imull and 32-bit as well.

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

llvm-svn: 227308

9 years ago[x32] Enable sibcall optimization on x32.
Michael Kuperstein [Wed, 28 Jan 2015 13:38:48 +0000 (13:38 +0000)]
[x32] Enable sibcall optimization on x32.

This includes two things:
1) Fix TCRETURNdi and TCRETURN64di patterns to check the right thing (LP64 as opposed to target bitness).
2) Allow LEA64_32 in MatchingStackOffset.

llvm-svn: 227307

9 years ago[docs] Use slightly more proper .rst markup
Sean Silva [Wed, 28 Jan 2015 10:36:41 +0000 (10:36 +0000)]
[docs] Use slightly more proper .rst markup

Again, I'd like to emphasize to everyone that this sort of markup change
is *not* what you should be concerned about when writing docs. Focus on
*content*.

I applaud Chandler for focusing on the fantastic content of this new
section!

llvm-svn: 227305

9 years ago[docs] [cleanup] No need for a comment around C++11 override
Sean Silva [Wed, 28 Jan 2015 10:26:29 +0000 (10:26 +0000)]
[docs] [cleanup] No need for a comment around C++11 override

llvm-svn: 227304

9 years agoAVX-512: Added FMA intrinsics with rounding mode
Elena Demikhovsky [Wed, 28 Jan 2015 10:21:27 +0000 (10:21 +0000)]
AVX-512: Added FMA intrinsics with rounding mode
By Asaf Badouh and Elena Demikhovsky

Added special nodes for rounding: FMADD_RND, FMSUB_RND..
It will prevent merge between nodes with rounding and other standard nodes.

llvm-svn: 227303

9 years ago[X86] Teach disassembler to handle illegal immediates on AVX512 integer compare instr...
Craig Topper [Wed, 28 Jan 2015 10:09:56 +0000 (10:09 +0000)]
[X86] Teach disassembler to handle illegal immediates on AVX512 integer compare instructions.

llvm-svn: 227302

9 years ago[X86] Merge printSSECC and printAVXCC. They only differed by an assertion.
Craig Topper [Wed, 28 Jan 2015 10:09:52 +0000 (10:09 +0000)]
[X86] Merge printSSECC and printAVXCC. They only differed by an assertion.

llvm-svn: 227301

9 years ago[LPM] Rip all of ManagedStatic and ThreadLocal out of the pretty stack
Chandler Carruth [Wed, 28 Jan 2015 09:52:14 +0000 (09:52 +0000)]
[LPM] Rip all of ManagedStatic and ThreadLocal out of the pretty stack
tracing code.

Managed static was just insane overhead for this. We took memory fences
and external function calls in every path that pushed a pretty stack
frame. This includes a multitude of layers setting up and tearing down
passes, the parser in Clang, everywhere. For the regression test suite
or low-overhead JITs, this was contributing to really significant
overhead.

Even the LLVM ThreadLocal is really overkill here because it uses
pthread_{set,get}_specific logic, and has careful code to both allocate
and delete the thread local data. We don't actually want any of that,
and this code in particular has problems coping with deallocation. What
we want is a single TLS pointer that is valid to use during global
construction and during global destruction, any time we want. That is
exactly what every host compiler and OS we use has implemented for
a long time, and what was standardized in C++11. Even though not all of
our host compilers support the thread_local keyword, we can directly use
the platform-specific keywords to get the minimal functionality needed.
Provided this limited trial survives the build bots, I will move this to
Compiler.h so it is more widely available as a light weight if limited
alternative to the ThreadLocal class. Many thanks to David Majnemer for
helping me think through the implications across platforms and craft the
MSVC-compatible syntax.

The end result is *substantially* faster. When running llc in a tight
loop over a small IR file targeting the aarch64 backend, this improves
its performance by over 10% for me. It also seems likely to fix the
remaining regressions seen by JIT users with threading enabled.

This may actually have more impact on real-world compile times due to
the use of the pretty stack tracing utility throughout the rest of Clang
or LLVM, but I've not collected any detailed measurements.

llvm-svn: 227300

9 years ago[LPM] A targeted but somewhat horrible fix to the legacy pass manager's
Chandler Carruth [Wed, 28 Jan 2015 09:47:21 +0000 (09:47 +0000)]
[LPM] A targeted but somewhat horrible fix to the legacy pass manager's
querying of the pass registry.

The pass manager relies on the static registry of PassInfo objects to
perform all manner of its functionality. I don't understand why it does
much of this. My very vague understanding is that this registry is
touched both during static initialization *and* while each pass is being
constructed. As a consequence it is hard to make accessing it not
require a acquiring some lock. This lock ends up in the hot path of
setting up, tearing down, and invaliditing analyses in the legacy pass
manager.

On most systems you can observe this as a non-trivial % of the time
spent in 'ninja check-llvm'. However, I haven't really seen it be more
than 1% in extreme cases of compiling more real-world software,
including LTO.

Unfortunately, some of the GPU JITs are seeing this taking essentially
all of their time because they have very small IR running through
a small pass pipeline very many times (at least, this is the vague
understanding I have of it).

This patch tries to minimize the cost of looking up PassInfo objects by
leveraging the fact that the objects themselves are immutable and they
are allocated separately on the heap and so don't have their address
change. It also requires a change I made the last time I tried to debug
this problem which removed the ability to de-register a pass from the
registry. This patch creates a single access path to these objects
inside the PMTopLevelManager which memoizes the result of querying the
registry. This is somewhat gross as I don't really know if
PMTopLevelManager is the *right* place to put it, and I dislike using
a mutable member to memoize things, but it seems to work.

For long-lived pass managers this should completely eliminate
the cost of acquiring locks to look into the pass registry once the
memoized cache is warm. For 'ninja check' I measured about 1.5%
reduction in CPU time and in total time on a machine with 32 hardware
threads. For normal compilation, I don't know how much this will help,
sadly. We will still pay the cost while we populate the memoized cache.
I don't think it will hurt though, and for LTO or compiles with many
small functions it should still be a win. However, for tight loops
around a pass manager with many passes and small modules, this will help
tremendously. On the AArch64 backend I saw nearly 50% reductions in time
to complete 2000 cycles of spinning up and tearing down the pipeline.
Measurements from Owen of an actual long-lived pass manager show more
along the lines of 10% improvements.

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

llvm-svn: 227299

9 years agoFold fcmp in cases where value is provably non-negative. By Arch Robison.
Elena Demikhovsky [Wed, 28 Jan 2015 08:03:58 +0000 (08:03 +0000)]
Fold fcmp in cases where value is provably non-negative. By Arch Robison.

This patch folds fcmp in some cases of interest in Julia. The patch adds a function CannotBeOrderedLessThanZero that returns true if a value is provably not less than zero. I.e. the function returns true if the value is provably -0, +0, positive, or a NaN. The patch extends InstructionSimplify.cpp to fold instances of fcmp where:
 - the predicate is olt or uge
 - the first operand is provably not less than zero
 - the second operand is zero
The motivation for handling these cases optimizing away domain checks for sqrt in Julia for common idioms such as sqrt(x*x+y*y)..

http://reviews.llvm.org/D6972

llvm-svn: 227298

9 years ago[Mips] Fix enumeral and non-enumeral type in conditional expression warning
Simon Atanasyan [Wed, 28 Jan 2015 06:23:15 +0000 (06:23 +0000)]
[Mips] Fix enumeral and non-enumeral type in conditional expression warning

No functional changes.

llvm-svn: 227297

9 years agollvm-ar: Remove unimplemented -N option from -help
David Majnemer [Wed, 28 Jan 2015 06:00:01 +0000 (06:00 +0000)]
llvm-ar: Remove unimplemented -N option from -help

This fixes PR22358.

llvm-svn: 227296

9 years agoSema: Ensure that __c11_atomic_fetch_add has a pointer to complete type
David Majnemer [Wed, 28 Jan 2015 05:48:06 +0000 (05:48 +0000)]
Sema: Ensure that __c11_atomic_fetch_add has a pointer to complete type

Pointer arithmetic is only makes sense if the pointee type is complete.

This fixes PR22361.

llvm-svn: 227295

9 years ago[LPM] Stop using the string based preservation API. It is an
Chandler Carruth [Wed, 28 Jan 2015 04:57:56 +0000 (04:57 +0000)]
[LPM] Stop using the string based preservation API. It is an
abomination.

For starters, this API is incredibly slow. In order to lookup the name
of a pass it must take a memory fence to acquire a pointer to the
managed static pass registry, and then potentially acquire locks while
it consults this registry for information about what passes exist by
that name. This stops the world of LLVMs in your process no matter
how little they cared about the result.

To make this more joyful, you'll note that we are preserving many passes
which *do not exist* any more, or are not even analyses which one might
wish to have be preserved. This means we do all the work only to say
"nope" with no error to the user.

String-based APIs are a *bad idea*. String-based APIs that cannot
produce any meaningful error are an even worse idea. =/

I have a patch that simply removes this API completely, but I'm hesitant
to commit it as I don't really want to perniciously break out-of-tree
users of the old pass manager. I'd rather they just have to migrate to
the new one at some point. If others disagree and would like me to kill
it with fire, just say the word. =]

llvm-svn: 227294

9 years agoMigrate AArch64 except for TTI and AsmPrinter away from getSubtargetImpl.
Eric Christopher [Wed, 28 Jan 2015 03:51:33 +0000 (03:51 +0000)]
Migrate AArch64 except for TTI and AsmPrinter away from getSubtargetImpl.

llvm-svn: 227293

9 years agoIntroduce a section to the programmers manual about type hierarchies,
Chandler Carruth [Wed, 28 Jan 2015 03:04:54 +0000 (03:04 +0000)]
Introduce a section to the programmers manual about type hierarchies,
polymorphism, and virtual dispatch.

This is essentially trying to explain the emerging design techniques
being used in LLVM these days somewhere more accessible than the
comments on a particular piece of infrastructure. It covers the
"concepts-based polymorphism" that caused some confusion during initial
reviews of the new pass manager as well as the tagged-dispatch mechanism
used pervasively in LLVM and Clang.

Perhaps most notably, I've tried to provide some criteria to help
developers choose between these options when designing new pieces of
infrastructure.

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

llvm-svn: 227292

9 years agoAdd description to assert
David Blaikie [Wed, 28 Jan 2015 02:43:15 +0000 (02:43 +0000)]
Add description to assert

llvm-svn: 227291

9 years agoPR22356: DebugInfo: Handle the size of a member where the type of that member is...
David Blaikie [Wed, 28 Jan 2015 02:34:53 +0000 (02:34 +0000)]
PR22356: DebugInfo: Handle the size of a member where the type of that member is a typedef (or other sugar) of a declaration.

llvm-svn: 227290

9 years agoEmit a warning the first time that one tries to resolve the size of a type passing...
Enrico Granata [Wed, 28 Jan 2015 01:41:00 +0000 (01:41 +0000)]
Emit a warning the first time that one tries to resolve the size of a type passing a nullptr ExecutionContext - but only when it might actually make a difference

This should help us find these cases and act on them

llvm-svn: 227289

9 years agoChanges in 226712 needed some fixing as a platform is almost always selected and...
Greg Clayton [Wed, 28 Jan 2015 01:33:37 +0000 (01:33 +0000)]
Changes in 226712 needed some fixing as a platform is almost always selected and even if platform options are specified when doing a "target create" they would get ignored if a platform was already selected.

The change was made so we could re-use a platform if one was already created instead of creating a new one, but it would fail in the above case. To fix this, if we have a selected platform, we verify that the platform matches the current platform before we try to re-use it. We do this by asking the OptionGroupPlatform if the platform matches. If so, it returns true and we don't create a new platform, else we do.

llvm-svn: 227288

9 years agoRevert r227247 and r227228: "Add weak symbol support to RuntimeDyld".
Lang Hames [Wed, 28 Jan 2015 01:30:37 +0000 (01:30 +0000)]
Revert r227247 and r227228: "Add weak symbol support to RuntimeDyld".

This has wider implications than I expected when I reviewed the patch: It can
cause JIT crashes where clients have used the default value for AbortOnFailure
during symbol lookup. I'm currently investigating alternative approaches and I
hope to have this back in tree soon.

llvm-svn: 227287

9 years ago[llvm-pdbdump] Add basic symbol dumping.
Zachary Turner [Wed, 28 Jan 2015 01:22:33 +0000 (01:22 +0000)]
[llvm-pdbdump] Add basic symbol dumping.

This adds two command line options:

--symbols dumps a list of all symbols found in the PDB.
--symbol-details dumps the same list, but with detailed information
                 for every symbol such as type, attributes, etc.

llvm-svn: 227286

9 years agoSBThread::GetDescription should use the Thread format instead of making up
Jim Ingham [Wed, 28 Jan 2015 01:18:01 +0000 (01:18 +0000)]
SBThread::GetDescription should use the Thread format instead of making up
some format of its own.

llvm-svn: 227285

9 years agoMove EH personality type classification to Analysis/LibCallSemantics.h
Reid Kleckner [Wed, 28 Jan 2015 01:17:38 +0000 (01:17 +0000)]
Move EH personality type classification to Analysis/LibCallSemantics.h

Summary:
Also add enum types for __C_specific_handler and _CxxFrameHandler3 for
which we know a few things.

Reviewers: majnemer

Subscribers: llvm-commits

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

llvm-svn: 227284