Commit Graph

209947 Commits

Author SHA1 Message Date
John McCall 9a2c1c9603 Don't crash when emitting a block under returns_nonnull.
rdar://22071955

llvm-svn: 247228
2015-09-10 00:57:46 +00:00
Greg Clayton a865b80c5a Removed debug prints that I accidentally left in.
llvm-svn: 247227
2015-09-10 00:57:34 +00:00
Hans Wennborg d2799a963f Revert r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
This caused build breakges, e.g.
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/24926

llvm-svn: 247226
2015-09-10 00:57:26 +00:00
Ahmed Bougacha 37bffd83f0 [CodeGen] Make x86 nontemporal store patfrags generic. NFC.
To be used by other targets.

llvm-svn: 247225
2015-09-10 00:53:15 +00:00
Greg Clayton a93877b9dc On MacOSX, revamp the way we link against the llvm/clang .a files by making a text file that contains all .a filenames and use that when linking in Xcode.
llvm-svn: 247224
2015-09-10 00:48:44 +00:00
Philip Reames 953817b65d [RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC]
llvm-svn: 247223
2015-09-10 00:44:10 +00:00
Hans Wennborg e89c8c8033 Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
Seems it broke the Polly build.
From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio:

In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0:
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()'
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error:   overriding 'virtual llvm::Init::~Init() noexcept (true)'

llvm-svn: 247222
2015-09-10 00:37:18 +00:00
Philip Reames b4e55f3923 [RewriteStatepointsForGC] Strengthen a confusingly weak assertion [NFC]
The assertion was weaker than it should be and gave the impression we're growing the number of base defining values being considered during the fixed point interation.  That's not true.  The tighter form of the assert is useful documentation.

llvm-svn: 247221
2015-09-10 00:32:56 +00:00
Philip Reames c8ded462c4 [RewriteStatepointsForGC] One last bit of naming [NFCI]
llvm-svn: 247220
2015-09-10 00:27:50 +00:00
Reid Kleckner 7878391208 [WinEH] Add codegen support for cleanuppad and cleanupret
All of the complexity is in cleanupret, and it mostly follows the same
codepaths as catchret, except it doesn't take a return value in RAX.

This small example now compiles and executes successfully on win32:
  extern "C" int printf(const char *, ...) noexcept;
  struct Dtor {
    ~Dtor() { printf("~Dtor\n"); }
  };
  void has_cleanup() {
    Dtor o;
    throw 42;
  }
  int main() {
    try {
      has_cleanup();
    } catch (int) {
      printf("caught it\n");
    }
  }

Don't try to put the cleanup in the same function as the catch, or Bad
Things will happen.

llvm-svn: 247219
2015-09-10 00:25:23 +00:00
Hans Wennborg 60f3e1f466 Fix Clang-tidy misc-use-override warnings, other minor fixes
Patch by Eugene Zelenko!

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

llvm-svn: 247218
2015-09-10 00:24:40 +00:00
Philip Reames 34d7a7493d [RewriteStatepointsForGC] Further style/naming fixup [NFCI]
llvm-svn: 247217
2015-09-10 00:22:49 +00:00
Hans Wennborg 6fa09455ed Fix Clang-tidy misc-use-override warnings, other minor fixes
Patch by Eugene Zelenko!

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

llvm-svn: 247216
2015-09-10 00:12:56 +00:00
Mehdi Amini c7aa5ca8a8 Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)
This reapply commit r247178 after post-commit review from D.Blaikie
in a way that makes it compatible with the existing API.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247215
2015-09-10 00:05:09 +00:00
Mehdi Amini defa546551 Add makeArrayRef() overload for ArrayRef input (no-op/identity) NFC
The purpose is to allow templated wrapper to work with either
ArrayRef or any convertible operation:

template<typename Container>
void wrapper(const Container &Arr) {
  impl(makeArrayRef(Arr));
}

with Container being a std::vector, a SmallVector, or an ArrayRef.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247214
2015-09-10 00:05:04 +00:00
Philip Reames 7540e3a45d [RewriteStatepointsForGC] More naming cleanup [NFCI]
llvm-svn: 247213
2015-09-10 00:01:53 +00:00
Philip Reames ece70b8042 [RewriteStatepointsForGC] Code cleanup [NFC]
Factor out common code related to naming values, fix a small style issue.  More to follow in separate changes.

llvm-svn: 247211
2015-09-09 23:57:18 +00:00
Philip Reames 6628713f4f [RewriteStatepointsForGC] Extend base pointer inference to handle insertelement
This change is simply enhancing the existing inference algorithm to handle insertelement instructions by conservatively inserting a new instruction to propagate the vector of associated base pointers. In the process, I'm ripping out the peephole optimizations which mostly helped cover the fact this hadn't been done.

Note that most of the newly inserted nodes will be nearly immediately removed by the post insertion optimization pass introduced in 246718. Arguably, we should be trying harder to avoid the malloc traffic here, but I'd rather get the code correct, then worry about compile time.

Unlike previous extensions of the algorithm to handle more case, I discovered the existing code was causing miscompiles in some cases. In particular, we had an implicit assumption that the peephole covered *all* insert element instructions, so if we had a value directly based on a insert element the peephole didn't cover, we proceeded as if it were a base anyways. Not good. I believe we had the same issue with shufflevector which is why I adjusted the predicate for them as well.

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

llvm-svn: 247210
2015-09-09 23:40:12 +00:00
John McCall 6380a28248 ARC: Fix the precise-lifetime suppression of returns_inner_pointer
receiver extension for message sends via property syntax.

rdar://22172983

llvm-svn: 247209
2015-09-09 23:37:17 +00:00
Philip Reames 15d5563cea [RewriteStatepointsForGC] Make base pointer inference deterministic
Previously, the base pointer algorithm wasn't deterministic. The core fixed point was (of course), but we were inserting new nodes and optimizing them in an order which was unspecified and variable. We'd somewhat hacked around this for testing by sorting by value name, but that doesn't solve the general determinism problem.

Instead, we can use the order of traversal over the def/use graph to give us a single consistent ordering. Today, this is a DFS order, but the exact order doesn't mater provided it's deterministic for a given input.

(Q: It is safe to rely on a deterministic order of operands right?)

Note that this only fixes the determinism within a single inference step. The inference step is currently invoked many times in a non-deterministic order. That's a future change in the sequence. :)

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

llvm-svn: 247208
2015-09-09 23:26:08 +00:00
John McCall f4a1b77157 Fix access control for lookups using the Microsoft __super extension.
rdar://22464808

llvm-svn: 247207
2015-09-09 23:04:17 +00:00
Stephane Sezer eee657045f Fix a small comment typo in Windows Process code.
llvm-svn: 247206
2015-09-09 22:58:23 +00:00
Rafael Espindola 60252d8feb Change the load addr into something that works on linux x86_64.
With this simple static programs run again.

llvm-svn: 247205
2015-09-09 22:53:55 +00:00
NAKAMURA Takumi 1083c40152 thread_local is not implemented for targeting cygwin yet.
llvm-svn: 247204
2015-09-09 22:51:31 +00:00
Sanjay Patel daf34e9d85 convert builtin_unpredictable on a switch into metadata for LLVM
llvm-svn: 247203
2015-09-09 22:39:06 +00:00
Greg Clayton 140038a4ee Fix the build-llvm.pl to not create one monster .a file from all of the llvm and clang .a files. We now just make a file list which we pass to the linker.
llvm-svn: 247202
2015-09-09 22:35:25 +00:00
Peter Collingbourne 1cbc91eccf LowerBitSets: Fix non-determinism bug.
Visit disjoint sets in a deterministic order based on the maximum BitSetNM
index, otherwise the order in which we visit them will depend on pointer
comparisons. This was being exposed by MSan.

llvm-svn: 247201
2015-09-09 22:30:32 +00:00
Enrico Granata ac49453b58 Introduce the notion of an escape helper. Different languages have different notion of what to print in a string and how to escape non-printable things. The escape helper is where this notion is provided to LLDB
This is NFC, other than a code re-org

llvm-svn: 247200
2015-09-09 22:30:24 +00:00
Piotr Padlewski 255652e828 Generating assumption loads of vptr after ctor call (fixed)
Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

Edit:
Fixed version because of PR24479.
After this patch got reverted because of ScalarEvolution bug (D12719)
Merged after John McCall big patch (Added Address).

http://reviews.llvm.org/D11859

llvm-svn: 247199
2015-09-09 22:20:28 +00:00
Chandler Carruth 66ef16b289 [PM] Update Polly for the new AA infrastructure landed in r247167.
llvm-svn: 247198
2015-09-09 22:13:56 +00:00
Greg Clayton 13f11bba7d Remove unused function.
llvm-svn: 247197
2015-09-09 22:13:36 +00:00
Greg Clayton 34e2180a00 Now that CompilerType uses a "TypeSystem *" and a "void *" instead of a "clang::ASTContext *" and a "void *", we need to know if anyone is trying to create a CompilerType from a clang::ASTContext that has no backing ClangASTContext.
This assert will fire if this is the case and we will need to fix the offending code.

llvm-svn: 247196
2015-09-09 22:13:01 +00:00
Enrico Granata a4846c8524 Remove Target::GetBasicType()
I was experimenting with it briefly, and then settled on Target::GetTypeSystem + TypeSystem::GetBasicType, so this API is not necessary to have

Thanks to Ryan Brown for bringing it to my attention

llvm-svn: 247195
2015-09-09 22:00:18 +00:00
Nathan Wilson 085b9ff6e2 [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration
Summary: Diagnose variable and function concept declarations when an invalid specifier appears

Reviewers: rsmith, aaron.ballman, faisalv, fraggamuffin, hubert.reinterpretcast

Subscribers: cfe-commits

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

llvm-svn: 247194
2015-09-09 21:48:31 +00:00
Greg Clayton 51c63e3b30 Remove a call to deleted function.
llvm-svn: 247193
2015-09-09 21:34:32 +00:00
Reid Kleckner 94b704c469 [SEH] Emit 32-bit SEH tables for the new EH IR
The 32-bit tables don't actually contain PC range data, so emitting them
is incredibly simple.

The 64-bit tables, on the other hand, use the same table for state
numbering as well as label ranges. This makes things more difficult, so
it will be implemented later.

llvm-svn: 247192
2015-09-09 21:10:03 +00:00
Ed Maste 81f3ccb505 For now skip ThreadSpecificBreakTestCase on FreeBSD
It often hangs or times out, and obscures issues with other tests.
Just skip it for now (until the FreeBSD test suite is producing
consistent results) so that we can get a buildbot back.

Previous investigation (for failures) in llvm.org/pr18522

llvm-svn: 247190
2015-09-09 21:00:10 +00:00
Enrico Granata ad650a189c Preparatory work for letting language plugins help the StringPrinter with formatting special characters
llvm-svn: 247189
2015-09-09 20:59:49 +00:00
David Majnemer 22ee1a7466 [MS ABI] Don't crash on references to pointers to members in args
We know that a reference can always be dereferenced.  However, we don't
always know the number of bytes if the reference's pointee type is
incomplete.  This case was correctly handled but we didn't consider the
case where the type is complete but we cannot calculate its size for ABI
specific reasons.  In this specific case, a member pointer's size is
available only under certain conditions.

This fixes PR24703.

llvm-svn: 247188
2015-09-09 20:57:59 +00:00
Dan Gohman 5e0668426c [WebAssembly] Update target datalayout strings.
llvm-svn: 247187
2015-09-09 20:54:31 +00:00
Teresa Johnson 0f251a1cc6 Change EmitRecordWithAbbrevImpl to take Optional record code. NFC.
This change enables EmitRecord to pass the supplied record Code to
EmitRecordWithAbbrevImpl, rather than insert it into the Vals array.
It is an enabler for changing EmitRecord to take an ArrayRef<uintty> instead
of a SmallVectorImpl<uintty>&

Patch suggested by Duncan P. N. Exon Smith, modified by myself a bit to get
correct assertion checking.

llvm-svn: 247186
2015-09-09 20:53:31 +00:00
Michael J. Spencer 1d299a8a9d [elf2] Assign output sections to PHDRs.
This is a minimal implementation to produce legal output. Future patches will combine multiple compatible PT_LOADs.

llvm-svn: 247185
2015-09-09 20:48:09 +00:00
Piotr Padlewski 0dde00d239 ScalarEvolution assume hanging bugfix
http://reviews.llvm.org/D12719

llvm-svn: 247184
2015-09-09 20:47:30 +00:00
Mehdi Amini 5ae4a85e3f Revert "EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)"
This reverts commit r247179.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247183
2015-09-09 20:35:37 +00:00
Mehdi Amini c9a85abc6c Revert "Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)"
This reverts commit r247178.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247182
2015-09-09 20:35:15 +00:00
Rafael Espindola 778562fc78 Add the DT_NEEDED entries to the dynamic table.
llvm-svn: 247181
2015-09-09 20:26:23 +00:00
David Majnemer d34dbf07bd Revert trunc(lshr (sext A), Cst) to ashr A, Cst
This reverts commit r246997, it introduced a regression (PR24763).

llvm-svn: 247180
2015-09-09 20:20:08 +00:00
Mehdi Amini 65e742a34f EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247179
2015-09-09 20:08:51 +00:00
Mehdi Amini 7d2bf53ed1 Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247178
2015-09-09 20:08:39 +00:00
Renato Golin db7ea86bf4 Revert "AVX512: Implemented encoding and intrinsics for vextracti64x4 ,vextracti64x2, vextracti32x8, vextracti32x4, vextractf64x4, vextractf64x2, vextractf32x8, vextractf32x4 Added tests for intrinsics and encoding."
This reverts commit r247149, as it was breaking numerous buildbots of varied architectures.

llvm-svn: 247177
2015-09-09 19:44:40 +00:00