Aaron Ballman [Fri, 19 Feb 2016 14:03:20 +0000 (14:03 +0000)]
Add a new check, cert-flp30-c, that diagnoses loop induction expressions of floating-point type. This check corresponds to the CERT secure coding rule: https://securecoding.cert.org/confluence/display/c/FLP30-C.+Do+not+use+floating-point+variables+as+loop+counters
llvm-svn: 261324
Serge Pavlov [Fri, 19 Feb 2016 12:06:23 +0000 (12:06 +0000)]
Removed unused local variable
llvm-svn: 261323
George Rimar [Fri, 19 Feb 2016 11:56:49 +0000 (11:56 +0000)]
Attemp to heal windows buildbot
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/17414
llvm-svn: 261322
Alexey Bataev [Fri, 19 Feb 2016 11:23:28 +0000 (11:23 +0000)]
pr26544: Bitfield layout with pragma pack and attributes "packed" and
"aligned", by Vladimir Yakovlev
Fix clang/gcc incompatibility of bitfields layout in the presence of
pragma packed and attributes aligned and packed.
Differential Revision: http://reviews.llvm.org/D17023
llvm-svn: 261321
Tobias Grosser [Fri, 19 Feb 2016 11:07:12 +0000 (11:07 +0000)]
Codegen: Print error in Polly code verification and allow to disable verfication.
We now always print the reason why the code did not pass the LLVM verifier and
we also allow to disable verfication with -polly-codegen-verify=false. Before
this change the first assertion had generally no information why or what might
have gone wrong and it was also impossible to -view-cfg without recompile. This
change makes debugging bugs that result in incorrect IR a lot easier.
llvm-svn: 261320
Chandler Carruth [Fri, 19 Feb 2016 10:59:43 +0000 (10:59 +0000)]
[LPM] Document the new helpers to make it easy to get consistent require
and preserve behavior from loop passes.
Differential Revision: http://reviews.llvm.org/D17443
llvm-svn: 261319
Tamas Berghammer [Fri, 19 Feb 2016 10:59:25 +0000 (10:59 +0000)]
Stack unwinding emulation: handle adjustment of FP
This change is improving the instruction emulation based unwinding to
handle when the frame pointer is adjusted (increment/decrement) after
it has been initialized. The situation can occur in the prologue of
some function where FP is adjusted before it is copied back to SP.
Example code (thumb, generated by gcc 4.8):
< +0>: push {r4, r7, lr}
< +2>: sub sp, #0x14
< +4>: add r7, sp, #0x0
...
<+50>: adds r7, #0x14 ; The CL fixes the handling of this instruction
<+52>: mov sp, r7 ; Previously unwinding from here was broken
<+54>: pop {r4, r7, pc}
Differential revision: http://reviews.llvm.org/D17295
llvm-svn: 261318
George Rimar [Fri, 19 Feb 2016 10:45:45 +0000 (10:45 +0000)]
[ELF] - Minor refactor of LinkerScript file
* Else-ifs in ScriptParser::run() replaced with std::function + map
* Reordered members of ScriptParser
Differential revision: http://reviews.llvm.org/D17256
llvm-svn: 261317
Chandler Carruth [Fri, 19 Feb 2016 10:45:18 +0000 (10:45 +0000)]
[LPM] Factor all of the loop analysis usage updates into a common helper
routine.
We were getting this wrong in small ways and generally being very
inconsistent about it across loop passes. Instead, let's have a common
place where we do this. One minor downside is that this will require
some analyses like SCEV in more places than they are strictly needed.
However, this seems benign as these analyses are complete no-ops, and
without this consistency we can in many cases end up with the legacy
pass manager scheduling deciding to split up a loop pass pipeline in
order to run the function analysis half-way through. It is very, very
annoying to fix these without just being very pedantic across the board.
The only loop passes I've not updated here are ones that use
AU.setPreservesAll() such as IVUsers (an analysis) and the pass printer.
They seemed less relevant.
With this patch, almost all of the problems in PR24804 around loop pass
pipelines are fixed. The one remaining issue is that we run simplify-cfg
and instcombine in the middle of the loop pass pipeline. We've recently
added some loop variants of these passes that would seem substantially
cleaner to use, but this at least gets us much closer to the previous
state. Notably, the seven loop pass managers is down to three.
I've not updated the loop passes using LoopAccessAnalysis because that
analysis hasn't been fully wired into LoopSimplify/LCSSA, and it isn't
clear that those transforms want to support those forms anyways. They
all run late anyways, so this is harmless. Similarly, LSR is left alone
because it already carefully manages its forms and doesn't need to get
fused into a single loop pass manager with a bunch of other loop passes.
LoopReroll didn't use loop simplified form previously, and I've updated
the test case to match the trivially different output.
Finally, I've also factored all the pass initialization for the passes
that use this technique as well, so that should be done regularly and
reliably.
Thanks to James for the help reviewing and thinking about this stuff,
and Ben for help thinking about it as well!
Differential Revision: http://reviews.llvm.org/D17435
llvm-svn: 261316
Alexey Bataev [Fri, 19 Feb 2016 10:38:26 +0000 (10:38 +0000)]
[OPENMP] Improved layout of CGOpenMPRuntime class, NFC.
llvm-svn: 261315
Pavel Labath [Fri, 19 Feb 2016 10:36:38 +0000 (10:36 +0000)]
Enable TestUnicodeLiterals
Test should work everywhere except windows now.
llvm-svn: 261314
Pavel Labath [Fri, 19 Feb 2016 10:36:31 +0000 (10:36 +0000)]
Mark TestLldbGdbServer.test_software_breakpoint_set_and_remove_work_llgs as flaky on linux
The problem is the asynchronous arrival of inferior stdio (pr25652).
llvm-svn: 261313
David Majnemer [Fri, 19 Feb 2016 07:15:33 +0000 (07:15 +0000)]
Correct typos after acting on invalid subscript expressions
llvm-svn: 261312
Craig Topper [Fri, 19 Feb 2016 06:57:40 +0000 (06:57 +0000)]
[X86] Remove unused entries from the disassembler type enum.
llvm-svn: 261311
JF Bastien [Fri, 19 Feb 2016 06:54:47 +0000 (06:54 +0000)]
Add test.
llvm-svn: 261310
JF Bastien [Fri, 19 Feb 2016 06:54:45 +0000 (06:54 +0000)]
ARM: fix VFP asm constraints
Summary:
Rich Felker was sad that clang used 'w' and 'P' for VFP constraints when GCC documents them as 't' and 'w':
https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
This was added way back in 2008:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-
20080421/005393.html
Subscribers: aemerson, rengolin, cfe-commits
Differential Revision: http://reviews.llvm.org/D17349
llvm-svn: 261309
David Majnemer [Fri, 19 Feb 2016 04:46:48 +0000 (04:46 +0000)]
Shuffle header file as per the Coding Standards
llvm-svn: 261308
David Majnemer [Fri, 19 Feb 2016 04:46:06 +0000 (04:46 +0000)]
[SjLjEHPrepare] Simplify/cleanup code
No functional change is intended.
llvm-svn: 261307
Matthias Braun [Fri, 19 Feb 2016 04:44:19 +0000 (04:44 +0000)]
LegalizeDAG: Fix ExpandFCOPYSIGN assuming the same type on both inputs
llvm-svn: 261306
Chandler Carruth [Fri, 19 Feb 2016 04:09:40 +0000 (04:09 +0000)]
[LPM] Actually test what the O2 pass pipeline consists of in key places,
especially the *structure* of it with respect to various pass managers.
This uncovers an absolute horror show of problems. This test shows just
how bad PR24804 is: we have a totaly of *seven* loop pass managers in
the main optimization pipeline.
I've tried to comment the various bits to the best of my knowledge, but
more enhancements here would be great.
Also great would be folks adding various test for other pipelines, I'm
focused on trying to fix the O2 pipeline. I just wanted a test to show
what I'm changing.
llvm-svn: 261305
Easwaran Raman [Fri, 19 Feb 2016 03:15:33 +0000 (03:15 +0000)]
Add profile summary support for sample profile.
Differential Revision: http://reviews.llvm.org/D17178
llvm-svn: 261304
David Majnemer [Fri, 19 Feb 2016 03:13:40 +0000 (03:13 +0000)]
[SjLjEHPrepare] Don't grab pointers to functions in doInitialization
Certain optimization passes (like globaldce) can prune function
declaration that SjLjEHPrepare assumed would exit when it'd
runOnFunction.
This fixes PR26669.
llvm-svn: 261303
Chandler Carruth [Fri, 19 Feb 2016 03:12:14 +0000 (03:12 +0000)]
[AA] Preserve the AA results wrapper pass as well as BasicAA in a few
more places to prevent gratuitous re-"runs" of these passes.
The passes themselves don't do any work when run, but we keep spending
time scheduling and running these needlessly when we really don't need
to do so.
This is the first patch towards fixing the really horrible loop pass
pipeline fragmentation pointed out by Sanjoy in PR24804.
llvm-svn: 261302
Nico Weber [Fri, 19 Feb 2016 02:51:07 +0000 (02:51 +0000)]
Fix SemaTemplate/instantiate-field.cpp after r261297.
For templates, fields can have incomplete types:
template <class T>
struct A2 {
struct B;
B b;
};
Don't try to touch the DefinitionData of those fields.
llvm-svn: 261301
Davide Italiano [Fri, 19 Feb 2016 02:22:54 +0000 (02:22 +0000)]
[llvm-nm] In C++, main implicitly returns 0. Pointed out by David Blaikie.
llvm-svn: 261300
Lawrence Hu [Fri, 19 Feb 2016 02:17:07 +0000 (02:17 +0000)]
Bug fix: use dyn_cast_or_null instead of dyn_cast
Differential Revision: http://reviews.llvm.org/D17154
llvm-svn: 261299
David Blaikie [Fri, 19 Feb 2016 02:03:45 +0000 (02:03 +0000)]
llvm-dwp: Don't test compression when zlib isn't available
llvm-svn: 261298
Nico Weber [Fri, 19 Feb 2016 01:52:46 +0000 (01:52 +0000)]
Implement the likely resolution of core issue 253.
C++11 requires const objects to have a user-provided constructor, even for
classes without any fields. DR 253 relaxes this to say "If the implicit default
constructor initializes all subobjects, no initializer should be required."
clang is currently the only compiler that implements this C++11 rule, and e.g.
libstdc++ relies on something like DR 253 to compile in newer versions. This
change makes it possible to build code that says `const vector<int> v;' again
when using libstdc++5.2 and _GLIBCXX_DEBUG
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60284).
Fixes PR23381.
http://reviews.llvm.org/D16552
llvm-svn: 261297
David Blaikie [Fri, 19 Feb 2016 01:51:44 +0000 (01:51 +0000)]
llvm-dwp: Support compressed input
llvm-svn: 261296
Nico Weber [Fri, 19 Feb 2016 01:49:39 +0000 (01:49 +0000)]
Update cxx_dr_status.html with today's cwg_index.html.
Created by:
cd www
curl -O http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html
./make_cxx_dr_status
llvm-svn: 261295
Junmo Park [Fri, 19 Feb 2016 01:46:04 +0000 (01:46 +0000)]
Minor code cleanups. NFC.
llvm-svn: 261294
Devin Coughlin [Fri, 19 Feb 2016 01:35:10 +0000 (01:35 +0000)]
[analyzer] Add checker callback for beginning of function.
Add a checker callback that is called when the analyzer starts analyzing a
function either at the top level or when inlined. This will be used by a
follow-on patch making the DeallocChecker path sensitive.
Differential Revision: http://reviews.llvm.org/D17418
llvm-svn: 261293
Reid Kleckner [Fri, 19 Feb 2016 01:15:08 +0000 (01:15 +0000)]
[Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly
Fixes crash referenced in PR25181 where dyn_cast is called on a null
instance of LM.Method.
Reviewers: majnemer, rnk
Patch by Don Hinton
Differential Revision: http://reviews.llvm.org/D17072
llvm-svn: 261292
Mike Aizatsky [Fri, 19 Feb 2016 01:03:12 +0000 (01:03 +0000)]
[sancov] widening default blacklist.
Differential Revision: http://reviews.llvm.org/D17426
llvm-svn: 261291
Reid Kleckner [Fri, 19 Feb 2016 00:56:56 +0000 (00:56 +0000)]
Add call to find_package to load LLVM dependencies
ClangConfig requires LLVMConfig, so add find_package call in
ClangConfig so find_package(clang REQUIRED CONFIG) will just work. This
makes it easier for cmake based projects to use clang, e.g., tools using
ClangTooling.
Patch by Don Hinton
Differential Revision: http://reviews.llvm.org/D13622
llvm-svn: 261290
Mike Aizatsky [Fri, 19 Feb 2016 00:26:20 +0000 (00:26 +0000)]
[sancov] Adding covered/uncovered tables to coverage report.
Summary:
This change adds 3 tables to html report:
- list of covered files with number of functions covered.
- list of not covered files
- list of not covered functions.
I tried to put most coverage-calculating functionality into
SourceCoverageData.
Differential Revision: http://reviews.llvm.org/D17421
llvm-svn: 261287
Justin Lebar [Fri, 19 Feb 2016 00:18:46 +0000 (00:18 +0000)]
When printing MIR, output to errs() rather than outs().
Summary:
Without this, this command
$ llvm-run llc -stop-after machine-cp -o - <( echo '' )
outputs an error, because we close stdout twice -- once when closing the
file opened for "-o", and again when closing outs().
Also clarify in the outs() definition that you can't ever call it if you
want to open your own raw_fd_ostream on stdout.
Reviewers: jroelofs, tstellarAMD
Subscribers: jholewinski, qcolombet, dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D17422
llvm-svn: 261286
Richard Trieu [Fri, 19 Feb 2016 00:15:50 +0000 (00:15 +0000)]
Fix my typo from r261278
llvm-svn: 261285
Philip Reames [Fri, 19 Feb 2016 00:13:09 +0000 (00:13 +0000)]
[CaptureTracking] Add a test case for pointer cmpxchg
This test builds on 261250 (IR support for cmpxchg of pointers) and 261245 (capture tracking support for cmpxchg) to show that correctly analyze the capturing of pointers in a cmpxchg of pointer type.
llvm-svn: 261284
Philip Reames [Fri, 19 Feb 2016 00:06:41 +0000 (00:06 +0000)]
[IR] Extend cmpxchg to allow pointer type operands
Today, we do not allow cmpxchg operations with pointer arguments. We require the frontend to insert ptrtoint casts and do the cmpxchg in integers. While correct, this is problematic from a couple of perspectives:
1) It makes the IR harder to analyse (for instance, it make capture tracking overly conservative)
2) It pushes work onto the frontend authors for no real gain
This patch implements the simplest form of IR support. As we did with floating point loads and stores, we teach AtomicExpand to convert back to the old representation. This prevents us needing to change all backends in a single lock step change. Over time, we can migrate each backend to natively selecting the pointer type. In the meantime, we get the advantages of a cleaner IR representation without waiting for the backend changes.
Differential Revision: http://reviews.llvm.org/D17413
llvm-svn: 261281
Jason Molenda [Fri, 19 Feb 2016 00:05:17 +0000 (00:05 +0000)]
This patch stops lldb from loading a .lldbinit file from the current
working directory by default -- a typical security problem that we
need to be more conservative about.
It adds a new target setting, target.load-cwd-lldbinit which may
be true (always read $cwd/.lldbinit), false (never read $cwd/.lldbinit)
or warn (warn if there is a $cwd/.lldbinit and don't read it). The
default is set to warn. If this is met with unhappiness, we can look
at changing the default to true (to match current behavior) on a
different platform.
This does not affect reading of ~/.lldbinit - that will still be read,
as before. If you run lldb in your home directory, it will not warn
about the presence of a .lldbinit file there.
I had to add two SB API - SBHostOS::GetUserHomeDirectory and
SBFileSpec::AppendPathComponent - for the lldb driver code to be
able to get the home directory path in an OS neutral manner.
The warning text is
There is a .lldbinit file in the current directory which is not being read.
To silence this warning without sourcing in the local .lldbinit,
add the following to the lldbinit file in your home directory:
settings set target.load-cwd-lldbinit false
To allow lldb to source .lldbinit files in the current working directory,
set the value of this variable to true. Only do so if you understand and
accept the security risk.
<rdar://problem/
24199163>
llvm-svn: 261280
Jim Ingham [Thu, 18 Feb 2016 23:58:45 +0000 (23:58 +0000)]
Make sure code that is in the middle of figuring out the correct architecture
on attach uses the architecture it has figured out, rather than the Target's
architecture, which may not have been updated to the correct value yet.
<rdar://problem/
24632895>
llvm-svn: 261279
Richard Trieu [Thu, 18 Feb 2016 23:58:40 +0000 (23:58 +0000)]
Add -Wcomma warning to Clang.
-Wcomma will detect and warn on most uses of the builtin comma operator. It
currently whitelists the first and third statements of the for-loop. For other
cases, the warning can be silenced by casting the first operand of the comma
operator to void.
Differential Revision: http://reviews.llvm.org/D3976
llvm-svn: 261278
Sanjay Patel [Thu, 18 Feb 2016 23:08:48 +0000 (23:08 +0000)]
[x86] fix initialization of PredictableSelectIsExpensive
This is effectively NFC because Atom is the only in-order x86 subtarget currently,
but the predicate would have become wrong if any other in-order CPU came along.
See related discussion in:
http://reviews.llvm.org/D16836
llvm-svn: 261275
Argyrios Kyrtzidis [Thu, 18 Feb 2016 23:08:36 +0000 (23:08 +0000)]
[ASTImporter] Implement missing VisitAccessSpecDecl function in ASTImporter class.
Patch by Elisavet Sakellari!
llvm-svn: 261274
Chris Bieneman [Thu, 18 Feb 2016 23:07:09 +0000 (23:07 +0000)]
[CMake] Properly set CMAKE_BUILD_TYPE to Debug by default
Summary:
PR26666: CMAKE_BUILD_TYPE was previously being reset to blank.
Reviewers: rnk, beanz
Subscribers: llvm-commits
Patch By: Derek Bruening
Differential Revision: http://reviews.llvm.org/D17398
llvm-svn: 261273
Eugene Zelenko [Thu, 18 Feb 2016 22:39:14 +0000 (22:39 +0000)]
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectBreakpoint.cpp; other minor fixes.
llvm-svn: 261272
Richard Trieu [Thu, 18 Feb 2016 22:34:54 +0000 (22:34 +0000)]
Remove use of builtin comma operator.
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended.
llvm-svn: 261271
Richard Trieu [Thu, 18 Feb 2016 22:09:30 +0000 (22:09 +0000)]
Remove uses of builtin comma operator.
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended.
llvm-svn: 261270
Richard Trieu [Thu, 18 Feb 2016 22:07:42 +0000 (22:07 +0000)]
Change comma to semi-colon, no functionality change.
Cleanup for upcoming Clang warning -Wcomma.
llvm-svn: 261269
Jordan Rose [Thu, 18 Feb 2016 22:03:23 +0000 (22:03 +0000)]
[ADT] Be less clever when using a nonce type for disambiguation.
Old compilers don't like constexpr, but we're only going to use this in one
place anyway: this file. Everyone else should go through PointerLikeTypeTraits.
Update to r261259.
llvm-svn: 261268
Kostya Serebryany [Thu, 18 Feb 2016 21:49:10 +0000 (21:49 +0000)]
[libFuzzer] only read MaxLen bytes from every file in the corpus to speedup loading the corpus
llvm-svn: 261267
Ed Maste [Thu, 18 Feb 2016 21:38:24 +0000 (21:38 +0000)]
Remove expectedFlakeyFreeBSD decorator for prompt setting
The race condition/use after free involved in setting long prompts
appears to be fixed now (although I do not know which commit fixed it).
llvm.org/pr22611
llvm-svn: 261266
Adam Nemet [Thu, 18 Feb 2016 21:38:19 +0000 (21:38 +0000)]
[PPCLoopDataPrefetch] Move pass to Transforms/Scalar/LoopDataPrefetch. NFC
This patch is part of the work to make PPCLoopDataPrefetch
target-independent
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758).
Obviously the pass still only used from PPC at this point. Subsequent
patches will start driving this from ARM64 as well.
Due to the previous patch most lines should show up as moved lines.
llvm-svn: 261265
Adam Nemet [Thu, 18 Feb 2016 21:37:12 +0000 (21:37 +0000)]
[PPCLoopDataPrefetch] Remove PPC from some of the names. NFC
This is done only to make the next patch that move the pass out PPC to
Transforms easier to read. After this most line should show up as moved
lines in that patch.
This patch is part of the work to make PPCLoopDataPrefetch
target-independent
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758).
llvm-svn: 261264
Reid Kleckner [Thu, 18 Feb 2016 21:24:30 +0000 (21:24 +0000)]
Un-XFAIL the last C++ EH test, it was fixed by r261258
llvm-svn: 261263
David Majnemer [Thu, 18 Feb 2016 21:13:35 +0000 (21:13 +0000)]
[WinEH] Hoist state stores from successors
If we know that all of our successors want to be in the exact same
state, it makes sense to hoist the state transition into their common
predecessor.
Differential Revision: http://reviews.llvm.org/D17391
llvm-svn: 261262
Xinliang David Li [Thu, 18 Feb 2016 21:11:37 +0000 (21:11 +0000)]
Add test coverage for default linker
llvm-svn: 261261
Akira Hatanaka [Thu, 18 Feb 2016 21:05:09 +0000 (21:05 +0000)]
[Sema] Fix bug in TypeLocBuilder::pushImpl
The code in TypeLocBuilder::pushImpl wasn't correctly handling the case
where an element that has an 8-byte alignment was being pushed.
I plan to follow up with a patch to remove redundancies and simplify the
function.
rdar://problem/
23838912
Differential Revision: http://reviews.llvm.org/D16843
llvm-svn: 261260
Jordan Rose [Thu, 18 Feb 2016 21:00:08 +0000 (21:00 +0000)]
[ADT] Fix PointerEmbeddedInt when the underlying type is uintptr_t.
...and when you try to store negative values in it.
llvm-svn: 261259
Reid Kleckner [Thu, 18 Feb 2016 20:57:41 +0000 (20:57 +0000)]
[IR] Straighten out bundle overload of IRBuilder::CreateCall
IRBuilder has two ways of putting bundle operands on calls: the default
operand bundle, and an overload of CreateCall that takes an operand
bundle list.
Previously, this overload used a default argument of None. This made it
impossible to distinguish between the case were the caller doesn't care
about bundles, and the case where the caller explicitly wants no
bundles. We behaved as if they wanted the latter behavior rather than
the former, which led to problems with simplifylibcalls and WinEH.
This change fixes it by making the parameter non-optional, so we can
distinguish these two cases.
llvm-svn: 261258
Davide Italiano [Thu, 18 Feb 2016 20:43:15 +0000 (20:43 +0000)]
[X86ISelLowering] Use isPowerof2 instead of rewriting it. NFC.
llvm-svn: 261255
Amaury Sechet [Thu, 18 Feb 2016 20:38:32 +0000 (20:38 +0000)]
Add support for invoke/landingpad/resume in C API test
Summary: As per title. There was a lot of part missing in the C API, so I had to extend the invoke and landingpad API.
Reviewers: echristo, joker.eph, Wallbraker
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17359
llvm-svn: 261254
Krzysztof Parzyszek [Thu, 18 Feb 2016 20:30:40 +0000 (20:30 +0000)]
Missed a spot in r261251, also ignore attributes on all pointer parameters
llvm-svn: 261253
David L. Jones [Thu, 18 Feb 2016 20:27:16 +0000 (20:27 +0000)]
Use Backend_EmitMCNull for null codegen unit tests.
Using Backend_EmitLL attemps to create a file with an empty filename.
This is problematic in certain environments: an empty filename may be
illegal, or the default output path may not be writable (in the case
where an empty filename would otherwise have some non-failing
semantics). This patch switches to use Backend_EmitMCNull, which
allows CodeGen to run, but does not attempt to create or write an
output file.
Differential Revision: http://reviews.llvm.org/D17405
llvm-svn: 261252
Krzysztof Parzyszek [Thu, 18 Feb 2016 20:02:03 +0000 (20:02 +0000)]
Make test less prone to attribute changes
llvm-svn: 261251
Philip Reames [Thu, 18 Feb 2016 19:45:31 +0000 (19:45 +0000)]
Restrict scope of variables [NFC]
llvm-svn: 261250
Jonathan Peyton [Thu, 18 Feb 2016 19:38:25 +0000 (19:38 +0000)]
Remove unnecessary semicolons after braces
llvm-svn: 261249
Devin Coughlin [Thu, 18 Feb 2016 19:37:39 +0000 (19:37 +0000)]
[analyzer] Include comment mistakenly left out of r261243. NFC.
It explains why we can't just synthesize bodies of setters in BodyFarm.
llvm-svn: 261248
Nico Weber [Thu, 18 Feb 2016 19:32:54 +0000 (19:32 +0000)]
Make deprecation message for -fsanitize-coverage= with numeric argument friendlier.
http://reviews.llvm.org/D17397
llvm-svn: 261247
Enrico Granata [Thu, 18 Feb 2016 19:23:52 +0000 (19:23 +0000)]
Fix a typo in FormatCache.cpp such that the cache would potentially return an invalid format in some cases
llvm-svn: 261246
Philip Reames [Thu, 18 Feb 2016 19:23:27 +0000 (19:23 +0000)]
[CaptureTracking] Support atomicrmw and cmpxchg
These atomic operations are conceptually both a load and store from the same location. As such, we can treat them as the most conservative of those two components which in practice, means we can treat them like stores. An cmpxchg or atomicrmw captures the values, but not the locations accessed.
Note: We can probably be more aggressive about the comparison value in an cmpxhg since to have it be in memory, it must already be captured, but I figured it was better to avoid that for the moment.
Note 2: It turns out that since we don't actually support cmpxchg of pointer type, writing a negative test is impossible.
Differential Revision: http://reviews.llvm.org/D17400
llvm-svn: 261245
Devin Coughlin [Thu, 18 Feb 2016 19:13:30 +0000 (19:13 +0000)]
[analyzer] Improve modeling of ObjC synthesized property setters.
When modeling a call to a setter for a property that is synthesized to be
backed by an instance variable, don't invalidate the entire instance
but rather only the storage for the updated instance variable itself.
This still doesn't model the effect of the setter completely. It doesn't
bind the set value to the ivar storage location because doing so would cause
the set value to escape, removing valuable diagnostics about potential
leaks of the value from the retain count checker.
llvm-svn: 261243
Eugene Zelenko [Thu, 18 Feb 2016 18:52:47 +0000 (18:52 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes.
llvm-svn: 261242
Zachary Turner [Thu, 18 Feb 2016 18:50:02 +0000 (18:50 +0000)]
Add target and host platform enumerations so we're not using strings.
Differential Revision: http://reviews.llvm.org/D17088
llvm-svn: 261241
Zachary Turner [Thu, 18 Feb 2016 18:49:56 +0000 (18:49 +0000)]
Fix SocketTest on Windows.
Differential Revision: http://reviews.llvm.org/D17106
llvm-svn: 261240
Zachary Turner [Thu, 18 Feb 2016 18:47:29 +0000 (18:47 +0000)]
[DebugInfoPDB] Add source / line number accessors for PDB.
This patch adds a variety of different methods to query source
and line number information from PDB files.
llvm-svn: 261239
Hans Wennborg [Thu, 18 Feb 2016 18:44:33 +0000 (18:44 +0000)]
Add more triples after r261235
Since the behaviour is now different between Darwin and non-Darwin,
more triples are needed :-/
llvm-svn: 261238
Matthew Simpson [Thu, 18 Feb 2016 18:35:45 +0000 (18:35 +0000)]
[AArch64] Reduce vector insert/extract cost for Kryo
Differential Revision: http://reviews.llvm.org/D17379
llvm-svn: 261237
Reid Kleckner [Thu, 18 Feb 2016 18:33:58 +0000 (18:33 +0000)]
Clang on Windows supports exceptions, un XFAIL the passing tests
llvm-svn: 261236
Hans Wennborg [Thu, 18 Feb 2016 18:17:05 +0000 (18:17 +0000)]
Revert to extend i8/i16 return values on Darwin (PR26665)
In r260133, LLVM was changed to no longer extend i8/i16 return values,
as it's not required by the ABI. However, code was found in the wild
that relies on the old behaviour on Darwin, so this commit reverts
back to that old behaviour for Darwin.
On other platforms, it's less likely that code would be depending on
the old behaviour, as GCC and MSVC haven't been extending such return
values.
llvm-svn: 261235
Benjamin Kramer [Thu, 18 Feb 2016 18:02:48 +0000 (18:02 +0000)]
Make header self-contained. NFC.
llvm-svn: 261234
Reid Kleckner [Thu, 18 Feb 2016 17:58:22 +0000 (17:58 +0000)]
[WinASan] Fix page size and mmap granularity confusion
We were erroneously reporting 16K as the page size on Windows because
the code that does the shadow mapping was using page size instead of
allocation granularity. After fixing that, we can resolve the FIXMEs in
the Windows implementations of GetPageSize and GetMmapGranularity by
calling GetSystemInfo instead of returning hard-coded, incorrect
answers.
llvm-svn: 261233
Chad Rosier [Thu, 18 Feb 2016 17:49:57 +0000 (17:49 +0000)]
[Hexagon] Remove redundant check.
llvm-svn: 261232
Ben Craig [Thu, 18 Feb 2016 17:40:16 +0000 (17:40 +0000)]
Split locale management out of newlib/xlocale.h. NFCI
This is one part of many of a locale refactor. See
http://reviews.llvm.org/D17146 for an idea of where this is going.
For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.
The "do-nothing" / "nop" locale functions are also useful on their own for
other lightweight platforms. Putting these nop implementations in
support/xlocale should enable code sharing.
Unfortunately, I have no access to a newlib system to build and test with, so
this change has been made blind.
Reviewed: http://reviews.llvm.org/D17382
llvm-svn: 261231
Ben Craig [Thu, 18 Feb 2016 17:37:33 +0000 (17:37 +0000)]
Split locale management out of ibm/xlocale.h. NFCI
This is one part of many of a locale refactor. See
http://reviews.llvm.org/D17146 for an idea of where this is going.
For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.
Unfortunately, I have no access to an AIX machine to build with, so this change
has been made blind. Also, the original author (Xing Xue) does not appear to
have a Phabricator account.
Reviewed: http://reviews.llvm.org/D17380
llvm-svn: 261230
Ed Maste [Thu, 18 Feb 2016 17:35:30 +0000 (17:35 +0000)]
[tsan] Disable sysroot flag on FreeBSD
FreeBSD does not install a number of Clang-provided headers for the
compiler in the base system due to incompatibilities between FreeBSD's
and Clang's versions. As a workaround do not use --sysroot=. on FreeBSD
until this is addressed.
llvm.org/pr26651
Differential Revision: http://reviews.llvm.org/D17383
llvm-svn: 261229
Xinliang David Li [Thu, 18 Feb 2016 17:20:22 +0000 (17:20 +0000)]
Stop creating covmap as note section on ELF
covmap needs to created as non allocatable, but not with
SHT_NOTE. The latter was needed to workaround a problem
of BFD linker with gc, which is no longer needed. (A more
proper longer term fix requires changing FE driver to force
referencing the section using linker script).
Differential Revision: http://reviews.llvm.org/D17309
llvm-svn: 261228
Ewan Crawford [Thu, 18 Feb 2016 17:01:40 +0000 (17:01 +0000)]
Fix OSX cmake build
Commit r260721(http://reviews.llvm.org/D17182) introduced the following error when building for OSX using cmake:
Undefined symbols for architecture x86_64:
"_PyInit__lldb", referenced from:
-exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Adding '*' to the regex solves this problem, since it makes the symbol optional.
Reviewers: sivachandra, zturner, labath
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17384
llvm-svn: 261227
Johannes Doerfert [Thu, 18 Feb 2016 16:50:12 +0000 (16:50 +0000)]
Allow all combinations of types and subscripts for memory accesses
To support non-aligned accesses we introduce a virtual element size
for arrays that divides each access function used for this array. The
adjustment of the access function based on the element size of the
array was therefore moved after this virtual element size was
determined, thus after all accesses have been created.
Differential Revision: http://reviews.llvm.org/D17246
llvm-svn: 261226
Nicolai Haehnle [Thu, 18 Feb 2016 16:44:18 +0000 (16:44 +0000)]
AMDGPU/SI: add llvm.amdgcn.image.load/store[.mip] intrinsics
Summary:
These correspond to IMAGE_LOAD/STORE[_MIP] and are going to be used by Mesa
for the GL_ARB_shader_image_load_store extension.
IMAGE_LOAD is already matched by llvm.SI.image.load. That intrinsic has
a legacy name and pretends not to read memory.
Differential Revision: http://reviews.llvm.org/D17276
llvm-svn: 261224
Serge Pavlov [Thu, 18 Feb 2016 16:43:24 +0000 (16:43 +0000)]
File missed from r261222
llvm-svn: 261223
Serge Pavlov [Thu, 18 Feb 2016 16:42:09 +0000 (16:42 +0000)]
Avoid double deletion in Clang driver.
Llvm module object is shared between CodeGenerator and BackendConsumer,
in both classes it is stored as std::unique_ptr, which is not a good
design solution and can cause double deletion error. Usually it does
not occur because in BackendConsumer::HandleTranslationUnit the
ownership of CodeGenerator over the module is taken away. If however
this method is not called, the module is deleted twice and compiler crashes.
As the module owned by BackendConsumer is always the same as CodeGenerator
has, pointer to llvm module can be removed from BackendGenerator.
Differential Revision: http://reviews.llvm.org/D15450
llvm-svn: 261222
Aaron Ballman [Thu, 18 Feb 2016 16:36:01 +0000 (16:36 +0000)]
Add an AST matcher for real floating-point types. e.g., float, double, long double, but not complex.
llvm-svn: 261221
Krzysztof Parzyszek [Thu, 18 Feb 2016 16:10:27 +0000 (16:10 +0000)]
[Hexagon] Fix compilation error with GCC 6
Compiling Hexagon target with GCC 6 produces "error: should have been
declared inside" due to GCC PR c++/69657 which was merged.
Properly wrapping operator<<() definitions within the namespace llvm
fixes the issue.
Author: domagoj.stolfa
Differential Revision: http://reviews.llvm.org/D17281
llvm-svn: 261220
Yury Gribov [Thu, 18 Feb 2016 15:43:56 +0000 (15:43 +0000)]
[analyzer] dump_ast_matchers.py: fix replacement regexps
Patch by Alex Sidorin!
Differential Revision: http://reviews.llvm.org/D17376
llvm-svn: 261219
Krzysztof Parzyszek [Thu, 18 Feb 2016 15:42:57 +0000 (15:42 +0000)]
[Hexagon] Implement TLS support
Patch by Anand Kodnani.
llvm-svn: 261218
Benjamin Kramer [Thu, 18 Feb 2016 15:30:24 +0000 (15:30 +0000)]
[Parse] Code complete expressions in bracket declarators.
Currently we return no results when completing inside of the brackets in
a 'char foo[]' declaration. Let the generic expression completion code
handle it instead. We could get fancier here (e.g. filter non-constant
expressions in contexts where VLAs are not allowed), but it's a strict
improvement over the existing version.
llvm-svn: 261217
Hongbin Zheng [Thu, 18 Feb 2016 15:24:42 +0000 (15:24 +0000)]
Add more isl object printing function
llvm-svn: 261216
Hongbin Zheng [Thu, 18 Feb 2016 15:24:38 +0000 (15:24 +0000)]
Add the missing __isl_give to MemoryAccess::getAccessRelation
llvm-svn: 261215