Michael Kuperstein [Thu, 16 Jul 2015 12:20:31 +0000 (12:20 +0000)]
Revert "Make ExecutionEngine owning a DataLayout"
Reverting to fix buildbot breakage.
This reverts commit r242387.
llvm-svn: 242394
Benjamin Kramer [Thu, 16 Jul 2015 11:12:05 +0000 (11:12 +0000)]
[Mips] Make helper function static, NFC.
llvm-svn: 242393
Tamas Berghammer [Thu, 16 Jul 2015 10:00:06 +0000 (10:00 +0000)]
Improve XFAIL for test_lldb_process_load_and_unload_commands
llvm-svn: 242392
Pavel Labath [Thu, 16 Jul 2015 08:45:03 +0000 (08:45 +0000)]
Revert "[NativeProcessLinux] Integrate MainLoop"
This seems to be causing major slowdows on the android buildbot. Reverting while I investigate.
llvm-svn: 242391
Tobias Grosser [Thu, 16 Jul 2015 08:28:09 +0000 (08:28 +0000)]
Add option to choose where in the pass pipeline polly is run
These options are useful to play with the location of Polly within LLVM's
pass manager.
llvm-svn: 242390
Tobias Grosser [Thu, 16 Jul 2015 08:20:37 +0000 (08:20 +0000)]
Add PM extension point EP_VectorizerStart
This extension point allows passes to be executed right before the vectorizer
and other highly target specific optimizations are run.
llvm-svn: 242389
Mehdi Amini [Thu, 16 Jul 2015 06:23:12 +0000 (06:23 +0000)]
Add missing break in switch case in R600ISelLowering
Summary: Catched by coverity.
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11120
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242388
Mehdi Amini [Thu, 16 Jul 2015 06:17:14 +0000 (06:17 +0000)]
Make ExecutionEngine owning a DataLayout
Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.
The ExecutionEngine will act as an exception and will be unsafe to
be reused across context. We don't enforce this rule but undefined
behavior can occurs if the user tries to do it.
Reviewers: lhames
Subscribers: echristo, llvm-commits, rafael, yaron.keren
Differential Revision: http://reviews.llvm.org/D11110
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242387
Mehdi Amini [Thu, 16 Jul 2015 06:11:10 +0000 (06:11 +0000)]
Move most user of TargetMachine::getDataLayout to the Module one
Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.
This patch is quite boring overall, except for some uglyness in
ASMPrinter which has a getDataLayout function but has some clients
that use it without a Module (llmv-dsymutil, llvm-dwarfdump), so
some methods are taking a DataLayout as parameter.
Reviewers: echristo
Subscribers: yaron.keren, rafael, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D11090
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242386
Mehdi Amini [Thu, 16 Jul 2015 06:04:17 +0000 (06:04 +0000)]
Remove DataLayout from TargetLoweringObjectFile, redirect to Module
Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.
Reviewers: echristo
Subscribers: yaron.keren, rafael, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D11079
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242385
Mehdi Amini [Thu, 16 Jul 2015 05:59:25 +0000 (05:59 +0000)]
Redirect pointerSize query to the TargetMachine in ASMPrinter
Summary:
Because llvm-dsymutil is using ASMPrinter without any MachineFunction
of Module available.
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.
Reviewers: echristo
Subscribers: yaron.keren, rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D11078
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242384
Filipe Cabecinhas [Thu, 16 Jul 2015 05:22:17 +0000 (05:22 +0000)]
Actually "RUN:" the tests...
llvm-svn: 242383
Alexey Bataev [Thu, 16 Jul 2015 04:19:43 +0000 (04:19 +0000)]
[OPENMP] Fixed detection of canonical loops with random access iterators.
Add handling of iterators with copy/move constructors with default arguments + converting template constructors.
llvm-svn: 242382
Jaydeep Patil [Thu, 16 Jul 2015 03:51:55 +0000 (03:51 +0000)]
[LLDB][MIPS] Detect MIPS application specific extensions like micromips
SUMMARY:
The patch detects MIPS application specific extensions (ASE) like micromips by reading
ELF header.e_flags and SHT_MIPS_ABIFLAGS section. MIPS triple does not contain ASE
information like micromips, mips16, DSP, MSA etc. These can be read from header.e_flags
or SHT_MIPS_ABIFLAGS section.
Reviewers: clayborg
Subscribers: mohit.bhakkad, sagar, lldb-commits
Differential Revision: http://reviews.llvm.org/D11133
llvm-svn: 242381
Jason Molenda [Thu, 16 Jul 2015 03:42:40 +0000 (03:42 +0000)]
Only include the stack memory for the caller stack
frame, don't go any further, in RNBRemote::SendStopReplyPacketForThread.
These are the memory pre-fetches in the T05 packet and are
included in every private stop that lldb does. lldb needs, at most,
the caller stack frame so we're sending more data than needed by
including additional stack memory prefetches in this reply packet.
Once we've stopped for a public stop, we're going to do a jThreadsInfo
which will include the stack memory prefetches for all threads,
including the one which had the stop reason.
llvm-svn: 242380
Jason Molenda [Thu, 16 Jul 2015 03:38:17 +0000 (03:38 +0000)]
Build ValueObjectConstResultCast.cpp.
llvm-svn: 242379
David Majnemer [Thu, 16 Jul 2015 03:13:02 +0000 (03:13 +0000)]
[Intrin.h] Use compiler builtins to model memory barriers
_ReadBarrier, _WriteBarrier, and _ReadWriteBarrier are essentially
memory barriers of one form or another. Model these as
atomic_signal_fence(ATOMIC_SEQ_CST).
__faststorefence is a curious intrinsic. It's single purpose seems to
an alternative to mfence when that instruction is slow. However, mfence
is not always slow and is, in general, preferable to a 'lock or'
sequence on certain CPUs. Give the compiler freedom to select the best
sequence to get a fence.
llvm-svn: 242378
Marshall Clow [Thu, 16 Jul 2015 03:05:06 +0000 (03:05 +0000)]
Make sure that __libcpp_compressed_pair_imp default-constructs its' members, rather than value-initializing them. Fixes PR#24137
llvm-svn: 242377
Adam Nemet [Thu, 16 Jul 2015 02:48:05 +0000 (02:48 +0000)]
[LAA] Split out a helper to check the pointer partitions, NFC
This is made a static public member function to allow the transition of
this logic from LAA to LoopDistribution. (Technically, it could be an
implementation-local static function but then it would not be accessible
from LoopDistribution.)
llvm-svn: 242376
Marshall Clow [Thu, 16 Jul 2015 02:44:33 +0000 (02:44 +0000)]
Mark two tests as failing on clang 3.8 (they failed on 3.7, too)
llvm-svn: 242375
Siva Chandra [Thu, 16 Jul 2015 01:47:12 +0000 (01:47 +0000)]
Add a class ValueObjectConstResultCast.
Summary:
Other changes around the main change include:
1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl
and ValueObjectConstResultChild.
2. Add an argument |live_address| of type lldb::addr_t to the constructor
of ValueObjectConstResultChild. This is passed on to the backing
ValueObjectConstResultImpl object constructor so that the address of the
child value can be calculated properly.
Reviewers: granata.enrico, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11203
llvm-svn: 242374
Reid Kleckner [Thu, 16 Jul 2015 01:30:00 +0000 (01:30 +0000)]
Revert "[X86] Allow more call sequences to use push instructions for argument passing"
It miscompiles some code and a reduced test case has been sent to the
author.
This reverts commit r240257.
llvm-svn: 242373
Reid Kleckner [Thu, 16 Jul 2015 01:16:39 +0000 (01:16 +0000)]
Revert "Update LLVM bindings after r239940. ..."
Revert the changes to the C API LLVMBuildLandingPad that were part of
the personality function move. We now set the personality on the parent
function when the C API attempts to construct a landingpad with a
personality.
This reverts commit r240010.
llvm-svn: 242372
Nikola Smiljanic [Thu, 16 Jul 2015 01:06:17 +0000 (01:06 +0000)]
PR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appears inside needs to be desugared.
llvm-svn: 242371
Alex Lorenz [Thu, 16 Jul 2015 00:58:33 +0000 (00:58 +0000)]
Fix broken testcase from r242358.
The testcase failed on non X86 targets, because I forgot to pass the
'-march=x86-64' option into llc for one of the X86 specific tests.
llvm-svn: 242370
Akira Hatanaka [Thu, 16 Jul 2015 00:58:23 +0000 (00:58 +0000)]
[ARM] Define a subtarget feature that is used to avoid using movt/movw
pairs for 32-bit immediates.
This change is needed to avoid emitting movt/movw pairs when doing LTO
and do so on a per-function basis.
Out-of-tree projects currently using cl::opt option -arm-use-movt=0 or
false to avoid emitting movt/movw pairs should make changes to add
subtarget feature "+no-movt" (see the changes made to clang in r242368).
rdar://problem/
21529937
Differential Revision: http://reviews.llvm.org/D11026
llvm-svn: 242369
Akira Hatanaka [Thu, 16 Jul 2015 00:43:00 +0000 (00:43 +0000)]
[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
"-arm-use-movt=0".
This change is needed since backend options do not make it to the backend
when doing LTO and are not capable of changing the behavior of code-gen
passes on a per-function basis.
rdar://problem/
21529937
Differential Revision: http://reviews.llvm.org/D11025
llvm-svn: 242368
Rafael Espindola [Thu, 16 Jul 2015 00:38:34 +0000 (00:38 +0000)]
Trying to fix the windows bots.
llvm-svn: 242367
Evgeniy Stepanov [Thu, 16 Jul 2015 00:32:26 +0000 (00:32 +0000)]
Revert r242365.
r242365 removed two unrelated files by accident.
llvm-svn: 242366
Naomi Musgrave [Thu, 16 Jul 2015 00:25:46 +0000 (00:25 +0000)]
updated tests for correct commit, concerning D11198
Summary: Updating missed changes in revision D11198
Reviewers: eugenis, kcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11251
llvm-svn: 242365
Naomi Musgrave [Thu, 16 Jul 2015 00:25:45 +0000 (00:25 +0000)]
updated tests for correct commit
llvm-svn: 242364
Alexey Samsonov [Thu, 16 Jul 2015 00:20:50 +0000 (00:20 +0000)]
[CMake] Revisit PR23539: allow to override SANITIZER_MIN_OSX_VERSION at configure time.
Some users may need to configure Clang/compiler-rt with
-DMACOSX_DEPLOYMENT_TARGET=10.6, as they expect Clang to produce working
(non-sanitized) binaries on 10.6. In this case they would need to
additionally provide -DSANITIZER_MIN_OSX_VERSION=10.7 to mark
that sanitizer runtimes may only be used on 10.7+ (where they are
supported).
llvm-svn: 242363
Rafael Espindola [Thu, 16 Jul 2015 00:14:49 +0000 (00:14 +0000)]
Fix handling of relative paths in thin archives.
The member has to end up with a path relative to the archive.
llvm-svn: 242362
Pete Cooper [Thu, 16 Jul 2015 00:09:18 +0000 (00:09 +0000)]
Clear kill flags in ARMLoadStoreOptimizer.
The pass here was clearing kill flags on instructions which had
their sources killed in the instruction being combined. But
given that the new instruction is inserted after the existing ones,
any existing instructions with kill flags will lead to the verifier
complaining that we are reading an undefined physreg.
For example, what we had prior to this optimization is
t2STRi12 %R1, %SP, 12
t2STRi12 %R1<kill>, %SP, 16
t2STRi12 %R0<kill>, %SP, 8
and prior to this fix that would generate
t2STRi12 %R1<kill>, %SP, 16
t2STRDi8 %R0<kill>, %R1, %SP, 8
This is clearly incorrect as it didn't clear the kill flag on R1
used with offset 16 because there was no kill flag on the instruction
with offset 12.
After this change we clear the kill flag on the offset 16 instruction
because we know it will be used afterwards in the new instruction.
I haven't provided a test case. I have a small test, but even it is
very sensitive to register allocation order which isn't ideal.
llvm-svn: 242359
Alex Lorenz [Wed, 15 Jul 2015 23:38:35 +0000 (23:38 +0000)]
MIR Serialization: Serialize the jump table index operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242358
Alex Lorenz [Wed, 15 Jul 2015 23:31:07 +0000 (23:31 +0000)]
MIR Serialization: Serialize the jump table info.
The jump table info is serialized using a YAML mapping that contains its kind
and a YAML sequence of jump table entries. A jump table entry is a YAML mapping
that has an ID and an inline YAML sequence of machine basic block references.
The testcase 'CodeGen/MIR/X86/jump-table-info.mir' doesn't have any instructions
because one of them contains a jump table index operand. The jump table index
operands will be serialized in a follow up patch, and the appropriate
instructions will be added to this testcase.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242357
Sean Silva [Wed, 15 Jul 2015 23:23:02 +0000 (23:23 +0000)]
Add a test for r242281 from an old patch of mine.
This isn't thorough, but should serve as a sanity check.
llvm-svn: 242356
Cong Hou [Wed, 15 Jul 2015 23:20:34 +0000 (23:20 +0000)]
Remove a private member of BranchProbabilityInfo which is not used at all.
The member to be removed is LoopInfo *LI.
llvm-svn: 242355
Rafael Espindola [Wed, 15 Jul 2015 23:15:33 +0000 (23:15 +0000)]
llvm-ar: Don't write the directory in the string table.
We were already doing the right thing for short file names, but not long
ones.
llvm-svn: 242354
Rui Ueyama [Wed, 15 Jul 2015 23:01:36 +0000 (23:01 +0000)]
COFF: Fix offset in x86 delay-load thunks.
llvm-svn: 242353
Greg Clayton [Wed, 15 Jul 2015 22:59:03 +0000 (22:59 +0000)]
Added the ability to get JSON thread stop info with thread ID and stop info only in the normal stop reply packets using the new "jthreads" key value pair.
This allows stepping operations that don't ever do a public stop to get all the info they need without having to send a jThreadsInfo packet since those tend to be large.
This patch will be followed by a patch that will detect when we do a public stop, and when that happens we will send a jThreadsInfo packet at that time to get all expedited registers and memory.
llvm-svn: 242352
Naomi Musgrave [Wed, 15 Jul 2015 22:57:10 +0000 (22:57 +0000)]
adding tests for various dtor decl types
Reviewers: eugenis, kcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11189
llvm-svn: 242351
Alexey Samsonov [Wed, 15 Jul 2015 22:50:39 +0000 (22:50 +0000)]
[probile] Fix memory leak introduced in r241824.
llvm-svn: 242350
Cong Hou [Wed, 15 Jul 2015 22:48:29 +0000 (22:48 +0000)]
Create a wrapper pass for BranchProbabilityInfo.
This new wrapper pass is useful when we want to do branch probability analysis conditionally (e.g. only in PGO mode) but don't want to add one more pass dependence.
http://reviews.llvm.org/D11241
llvm-svn: 242349
David Majnemer [Wed, 15 Jul 2015 22:48:26 +0000 (22:48 +0000)]
Silence GCC -Wparenthesis warning
llvm-svn: 242348
Rafael Espindola [Wed, 15 Jul 2015 22:46:53 +0000 (22:46 +0000)]
For new archive member we only need to store the full path.
We were storing both the path and the file name, which was redundant
and easy to get confused up with.
llvm-svn: 242347
Reid Kleckner [Wed, 15 Jul 2015 22:42:37 +0000 (22:42 +0000)]
[clang-cl] Use the Windows response file tokenizer
We were still using the Unix response file tokenizer for all driver
modes. This was difficult to get right in the beginning because there is
a circular dependency. The Driver class also can't officially determine
its mode until it can see all possible --driver-mode= flags, and those
flags could come from the response file.
Now we use the Windows parsing algorithm if the program name looks like
clang-cl, or if the --driver-mode=cl flag is present on the main command
line.
Fixes PR23709.
Reviewers: hans
Differential Revision: http://reviews.llvm.org/D11229
llvm-svn: 242346
Chen Li [Wed, 15 Jul 2015 22:41:13 +0000 (22:41 +0000)]
[LoopUnswitch] Add an else clause to IsTrivialUnswitchCondition() when checking HeaderTerm instruction type
Summary:
This is a trivial code change with no functionality effect.
When LoopUnswitch determines trivial unswitch condition, it checks whether the loop header's terminator instruction is a branch instruction or switch instruction since trivial unswitch condition can only apply to these two instruction types. The current code does not fail the check directly on other instruction types, but check the nullness of LoopExitBB variable instead. The added else clause makes the check fail immediately on other instruction types and makes the code more obvious.
Reviewers: reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11239
llvm-svn: 242345
Keno Fischer [Wed, 15 Jul 2015 22:39:44 +0000 (22:39 +0000)]
[Makefiles] One more library rename to align with CMake
This one I accidentally missed last time because I confused it with
the lldbUtility library. After this, all makefile libraries should
have the same names as their CMake counterparts.
llvm-svn: 242344
Rui Ueyama [Wed, 15 Jul 2015 22:26:57 +0000 (22:26 +0000)]
COFF: Implement x86 delay-load thunks.
llvm-svn: 242343
Rui Ueyama [Wed, 15 Jul 2015 22:21:08 +0000 (22:21 +0000)]
COFF: Fix mangled dllexported names.
If a symbol is exported as /export:foo, and foo is resolved as a
mangled name (_foo@<number> or ?foo@@Y...), that mangled name should
be written to the export table. Previously, we wrote the original
name to the export table.
llvm-svn: 242342
Hans Wennborg [Wed, 15 Jul 2015 22:18:25 +0000 (22:18 +0000)]
test-release.sh: Run both .o files through sed before comparing them
On some systems (e.g. Mac OS X), sed will add a newline to the end of
the output if there wasn't one already. This would cause false
cmp errors since the .o file from Phase 2 was passed through sed and
the one from Phase 3 wasn't. Work around this by passing both through
sed.
llvm-svn: 242341
Matthias Braun [Wed, 15 Jul 2015 22:16:00 +0000 (22:16 +0000)]
TargetRegisterInfo: Provide a way to check assigned registers in getRegAllocationHints()
Pass a const reference to LiveRegMatrix to getRegAllocationHints()
because some targets can prodive better hints if they can test whether a
physreg has been used for register allocation yet.
llvm-svn: 242340
Alex Lorenz [Wed, 15 Jul 2015 22:14:49 +0000 (22:14 +0000)]
MIR Serialization: Serialize references from the stack objects to named allocas.
This commit serializes the references to the named LLVM alloca instructions from
the stack objects in the machine frame info. This commit adds a field 'Name' to
the struct 'yaml::MachineStackObject'. This new field is used to store the name
of the alloca instruction when the alloca is present and when it has a name.
llvm-svn: 242339
Paul Robinson [Wed, 15 Jul 2015 22:04:54 +0000 (22:04 +0000)]
Add a "debugger tuning" concept that allows us to fine-tune how we
emit debug info, according to the preferences of the different
debuggers used on various targets.
Darwin and FreeBSD default to tuning for LLDB; PS4 defaults to tuning for
the SCE (Sony Computer Entertainment) debugger. All others default to GDB.
Differential Revision: http://reviews.llvm.org/D8506
llvm-svn: 242338
JF Bastien [Wed, 15 Jul 2015 21:51:33 +0000 (21:51 +0000)]
Fix mergefunc infinite loop
Self-referential constants containing references to a merged function
no longer cause the MergeFunctions pass to infinite loop. Also adds a
reproduction IR which would otherwise fail, which was isolated from a similar
issue in Chromium.
Author: jrkoenig
Reviewers: nlewycky, jfb
Subscribers: llvm-commits, nlewycky, jfb
Differential Revision: http://reviews.llvm.org/D11208
llvm-svn: 242337
Rafael Espindola [Wed, 15 Jul 2015 21:24:07 +0000 (21:24 +0000)]
Simplify a few uses of remove_filename by using parent_path instead.
llvm-svn: 242334
Chaoren Lin [Wed, 15 Jul 2015 21:18:26 +0000 (21:18 +0000)]
Remove shell-specific code from TestLoadUnload Makefile.
Reviewers: clayborg, sivachandra
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11202
llvm-svn: 242332
Hans Wennborg [Wed, 15 Jul 2015 21:06:16 +0000 (21:06 +0000)]
Switch the release script to build with CMake by default (PR21561)
It retains the possibility to use the autoconf build with a
command-line option ('-use-autoconf'), and uses that by default on Darwin since
compiler-rt requires it on that platform.
This commit also removes the "Release-64" flavour and related logic. The script
would previously do two builds unless the '-no-64bit' flag was passed, but on
my machine and from those I asked this always ended up producing two 64-bit builds,
causing much confusion.
It also removes the -build-triple option, which caused the --build= flag to
get passed to ./configure. This was presumably intended for cross-compiling,
but none of the release testers use it. If someone does want to pass it,
they can use '-configure-flags --build=foo' instead.
Differential Revision: http://reviews.llvm.org/D10715
llvm-svn: 242331
Rafael Espindola [Wed, 15 Jul 2015 20:45:56 +0000 (20:45 +0000)]
Handle the error of trying to convert a regular archive to a thin one.
While at it, test that we can add to a thin archive.
llvm-svn: 242330
Yaron Keren [Wed, 15 Jul 2015 20:41:28 +0000 (20:41 +0000)]
Finally, with no users for shell-preserves-root, remove it from lit.cfg.
llvm-svn: 242329
Gabor Horvath [Wed, 15 Jul 2015 20:32:07 +0000 (20:32 +0000)]
[Static Analyzer] Do not fail silently, when the analyzer is invoked from tooling lib, an analyzer plugin is loaded, but the runtime linker fails to link.
llvm-svn: 242326
Yaron Keren [Wed, 15 Jul 2015 20:04:18 +0000 (20:04 +0000)]
Erase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ
llvm-svn: 242323
Cong Hou [Wed, 15 Jul 2015 19:58:26 +0000 (19:58 +0000)]
Rename doFunction() in BFI to calculate() and change its parameters from pointers to references.
http://reviews.llvm.org/D11196
llvm-svn: 242322
Yaron Keren [Wed, 15 Jul 2015 19:42:18 +0000 (19:42 +0000)]
Erase REQUIRES: shell-preserves-root from more tests, see r242312.
llvm-svn: 242321
Tobias Edler von Koch [Wed, 15 Jul 2015 19:32:22 +0000 (19:32 +0000)]
Analyze recursive PHI nodes in BasicAA
Summary:
This patch allows phi nodes like
%x = phi [ %incptr, ... ] [ %var, ... ]
%incptr = getelementptr %x, 1
to be analyzed by BasicAliasAnalysis.
In aliasPHI, we can detect incoming values that are recursive GEPs with a
constant offset. Instead of trying to analyze a recursive GEP (and failing),
we now ignore it and instead set the size of the memory referenced by
the PHINode to UnknownSize. This represents all the possible memory
locations the pointer represented by the PHINode could be advanced to
by the GEP.
For now, this new behavior is turned off by default to allow debugging of
performance degradations seen with SPEC/x86 and Hexagon benchmarks.
The flag -basicaa-recphi turns it on.
Reviewers: hfinkel, sanjoy
Subscribers: tobiasvk_caf, sanjoy, llvm-commits
Differential Revision: http://reviews.llvm.org/D10368
llvm-svn: 242320
Chaoren Lin [Wed, 15 Jul 2015 19:22:12 +0000 (19:22 +0000)]
Use accept instead of accept4 for Android.
Summary:
The accept4 syscall is missing on older ARM Android kernels, and the accept()
call is implemented with the accept4 syscall, so we'll need to call the accept
syscall directly.
Reviewers: vharron, tberghammer, labath
Subscribers: ovyalov, chaoren, labath, tberghammer, aemerson, lldb-commits
Differential Revision: http://reviews.llvm.org/D10887
llvm-svn: 242319
Chaoren Lin [Wed, 15 Jul 2015 19:22:09 +0000 (19:22 +0000)]
Default to linking lldb-server statically for Android.
Reviewers: vharron, tberghammer
Subscribers: chaoren, labath, tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10858
llvm-svn: 242318
James Dennett [Wed, 15 Jul 2015 19:13:39 +0000 (19:13 +0000)]
Allow any comment to be a trailing comment when -fparse-all-comments is on.
This helps with freeform documentation styles, where otherwise code like
enum class E {
E1, // D1
E2 // D2
};
would result in D1 being associated with E2. To properly associate E1
with D1 and E2 with D2, this patch allows all raw comments C such that
C.isParseAllComments() to participate in trailing comment checks inside
getRawCommentForDeclNoCache. This takes care of linking the intended
documentation with the intended decls. There remains an issue with code
like:
foo(); // DN
int x;
To prevent DN from being associated with x, this patch adds a new test
on preceding-line comments C (where C.isParseAllComments() and also
C's kind is RCK_OrdinaryBCPL or RCK_OrdinaryC) that checks whether C
is the first non-whitespace thing on C's starting line.
Patch from Luke Zarko <zarko@google.com>, D11069 reviewed by rsmith.
llvm-svn: 242317
Birunthan Mohanathas [Wed, 15 Jul 2015 19:11:58 +0000 (19:11 +0000)]
clang-format: Fix return type breaking with overloaded operator functions
Differential Revision: http://reviews.llvm.org/D11177
llvm-svn: 242316
Evgeniy Stepanov [Wed, 15 Jul 2015 18:57:57 +0000 (18:57 +0000)]
-disable-llvm-optzns in one clang test.
The intent is to test Clang codegen at -O1, and not the LLVM
optimization pipeline.
llvm-svn: 242315
Yaron Keren [Wed, 15 Jul 2015 18:55:39 +0000 (18:55 +0000)]
Actually requiring shell disables the test on Windows whereas
previously requiring shell-preserves-root did not, so do not
require anything.
llvm-svn: 242314
Bill Schmidt [Wed, 15 Jul 2015 18:55:02 +0000 (18:55 +0000)]
[PPC64] Update tests for vec_sld
Revision 224297 modified the behavior of vec_sld for little endian so
that LLVM will generate the correct corresponding vsldoi instruction.
I neglected to update the existing tests, which continued to pass
because they were not specific enough. This patch adds enough
specificity to the tests to make them useful for BE and LE testing of
vec_sld.
llvm-svn: 242313
Yaron Keren [Wed, 15 Jul 2015 18:40:05 +0000 (18:40 +0000)]
Since r179283, internal shell is default on windows and so shell-preserves-root
is true on MSYS bash although this requires: used to disable tests on MSYS bash.
Nevertheless, all tests requiring shell-preserves-root do pass except for
Driver/darwin-sdkroot.c. It will require a patch, either by disabling it on
Windows or by fixing shell-preserves-root to really be true only on MSYS
and making darwin-sdkroot.c its only user.
In any case, all other tests requiring shell-preserves-root do not really require
it so I'm replacing REQUIRES: shell-preserves-root with REQUIRES: shell in two
tests first.
llvm-svn: 242312
Bruno Cardoso Lopes [Wed, 15 Jul 2015 18:10:46 +0000 (18:10 +0000)]
Revert "Refactor optimizeUncoalescable logic"
Likely broke compilation on ARM:
http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/13054
This reverts commit
0b7824464fbe3d3f386e2d4aef6a431422709e53.
llvm-svn: 242311
Bruno Cardoso Lopes [Wed, 15 Jul 2015 18:10:35 +0000 (18:10 +0000)]
Revert "Look through PHIs to find additional register sources"
Likely broke compilation on ARM:
http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/13054
This reverts commit
131ce4a838c081516cbfed039fc986b33e3979d6.
llvm-svn: 242310
Reid Kleckner [Wed, 15 Jul 2015 17:58:55 +0000 (17:58 +0000)]
Run clang-format on Tools.h, the indentation is inconsistent
llvm-svn: 242309
Cong Hou [Wed, 15 Jul 2015 17:58:15 +0000 (17:58 +0000)]
Test commit.
This is a test commit (one blank line deleted).
llvm-svn: 242308
David Majnemer [Wed, 15 Jul 2015 17:32:34 +0000 (17:32 +0000)]
[Targets] Define __BOOL_DEFINED for Windows targets in C++ mode
MSVC 4.2 didn't have bool as a builtin type but MSVC 5.0 does. When
they added it, they added a macro (__BOOL_DEFINED) which allows build
scripts and the like to know if they should provide their own bool.
Clang always supports bool as a builtin type in C++ mode.
llvm-svn: 242307
Dawn Perchik [Wed, 15 Jul 2015 17:25:01 +0000 (17:25 +0000)]
Fix -data-info-line when source includes column number.
This fixes an off-by-one bug in CMICmdCmdDataInfoLine::Acknowledge. Given:
LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:123:1
-data-info-line would report the line as 12, omitting the last digit.
Reviewed by: ki.stfu, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11209
llvm-svn: 242306
Pavel Labath [Wed, 15 Jul 2015 17:20:01 +0000 (17:20 +0000)]
[NativeProcessLinux] Integrate MainLoop
Summary:
This commit integrates MainLoop into NativeProcessLinux. By registering a SIGCHLD handler with
the llgs main loop, we can get rid of the special monitor thread in NPL, which saves as a lot of
thread ping-pong when responding to client requests (e.g. qThreadInfo processing time has been
reduced by about 40%). It also makes the code simpler, IMHO.
Reviewers: ovyalov, clayborg, tberghammer, chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11150
llvm-svn: 242305
Rafael Espindola [Wed, 15 Jul 2015 17:19:39 +0000 (17:19 +0000)]
Delete declared but not implemented functions.
llvm-svn: 242304
Aaron Ballman [Wed, 15 Jul 2015 17:11:21 +0000 (17:11 +0000)]
Add the ability to AST match a variable declaration that is an exception variable.
llvm-svn: 242303
Adrian Prantl [Wed, 15 Jul 2015 17:01:41 +0000 (17:01 +0000)]
Debug Info: Add basic support for external types references.
This is a necessary prerequisite for bootstrapping the emission
of debug info inside modules.
- Adds a FlagExternalTypeRef to DICompositeType.
External types must have a unique identifier.
- External type references are emitted using a forward declaration
with a DW_AT_signature([DW_FORM_ref_sig8]) based on the UID.
http://reviews.llvm.org/D9612
llvm-svn: 242302
Jonathan Peyton [Wed, 15 Jul 2015 16:57:19 +0000 (16:57 +0000)]
Re-indent the CMake refactor to two-space indention
I apologize for this nasty commit, but I somehow overlooked Chandler's
comment to re-indent these files to two space indention. I know this
is a horrible commit, but I figured if it was done quickly after the
first one, not too many conflicts would arise.
Again, I'm sorry and won't do this again.
llvm-svn: 242301
Pete Cooper [Wed, 15 Jul 2015 16:36:38 +0000 (16:36 +0000)]
Add missing load/store flags to thumb2 instructions.
These were the cause of a verifier error when building 7zip with
-verify-machineinstrs. Running 'make check' with the verifier
triggered the same error on the test here so i've updated the test
to run the verifier on one of its runs instead of adding a new one.
While looking at this code, there was a stale comment that these
instructions were only used for disassembly. This probably used to
be the case, but they are now used in the 'ARM load / store optimization pass' too.
llvm-svn: 242300
Daniel Jasper [Wed, 15 Jul 2015 16:26:47 +0000 (16:26 +0000)]
clang-format: Fix column layout with a comment in the last line.
Before:
int aaaaa[] = {
1, 2,
3, // comment
4, 5,
6 // comment
};
After:
int aaaaa[] = {
1, 2, 3, // comment
4, 5, 6 // comment
};
llvm-svn: 242299
Jonathan Peyton [Wed, 15 Jul 2015 16:05:30 +0000 (16:05 +0000)]
Large Refactor of CMake build system
This commit improves numerous functionalities of the OpenMP CMake build
system to be more conducive with LLVM's build system and build philosophies.
The CMake build system, as it was before this commit, was not up to LLVM's
standards and did not implement the configuration stage like most CMake based
build systems offer (check for compiler flags, libraries, etc.) In order to
improve it dramatically in a short period of time, a large refactoring had
to be done.
The main changes done with this commit are as follows:
* Compiler flag checks - The flags are no longer grabbed from compiler specific
directories. They are checked for availability in config-ix.cmake and added
accordingly inside LibompHandleFlags.cmake.
* Feature checks were added in config-ix.cmake. For example, the standard CMake
module FindThreads is probed for the threading model to use inside the OpenMP
library.
* OS detection - There is no longer a LIBOMP_OS variable, OS-specifc build logic
is wrapped around the WIN32 and APPLE macros with !(WIN32 OR APPLE) meaning
a Unix flavor of some sort.
* Got rid of vestigial functions/macros/variables
* Added new libomp_append() function which is used everywhere to conditionally
or undconditionally append to a list
* All targets have the libomp prefix so as not to interfere with any other
project
* LibompCheckLinkerFlag.cmake module was added which checks for linker flags
specifically for building shared libraries.
* LibompCheckFortranFlag.cmake module was added which checks for fortran flag
availability.
* Removed most of the cruft from the translation between the perl+Makefile based
build system and this one. The remaining components that they share are
perl scripts which I'm in the process of removing.
There is still more left to do. The perl scripts still need to be removed, and
a config.h.in file (or similarly named) needs to be added with #cmakedefine lines
in it. But this is a much better first step than the previous system.
Differential Revision: http://reviews.llvm.org/D10656
llvm-svn: 242298
Bill Schmidt [Wed, 15 Jul 2015 15:45:53 +0000 (15:45 +0000)]
[PPC64LE] Fix vec_sld semantics for little endian
The vec_sld interface provides access to the vsldoi instruction.
Unlike most of the vec_* interfaces, we do not attempt to change the
generated code for vec_sld based on the endian mode. It is too
difficult to correctly infer the desired semantics because of
different element types, and the corrected instruction sequence is
expensive, involving loading a permute control vector and performing a
generalized permute.
For GCC, this was implemented as "Don't touch the vec_sld"
implementation. When it came time for the LLVM implementation, I did
the same thing. However, this was hasty and incorrect. In LLVM's
version of altivec.h, vec_sld was previously defined in terms of the
vec_perm interface. Because vec_perm semantics are adjusted for
little endian, this means that leaving vec_sld untouched causes it to
generate something different for LE than for BE. Not good.
This patch adjusts the form of vec_perm that is used for vec_sld and
vec_vsldoi, effectively undoing the modifications so that the same
vsldoi instruction will be generated for both BE and LE.
There is an accompanying back-end patch to take care of some small
ripple effects caused by these changes.
llvm-svn: 242297
Bill Schmidt [Wed, 15 Jul 2015 15:45:30 +0000 (15:45 +0000)]
[PPC64LE] Fix vec_sld semantics for little endian
The vec_sld interface provides access to the vsldoi instruction.
Unlike most of the vec_* interfaces, we do not attempt to change the
generated code for vec_sld based on the endian mode. It is too
difficult to correctly infer the desired semantics because of
different element types, and the corrected instruction sequence is
expensive, involving loading a permute control vector and performing a
generalized permute.
For GCC, this was implemented as "Don't touch the vec_sld"
implementation. When it came time for the LLVM implementation, I did
the same thing. However, this was hasty and incorrect. In LLVM's
version of altivec.h, vec_sld was previously defined in terms of the
vec_perm interface. Because vec_perm semantics are adjusted for
little endian, this means that leaving vec_sld untouched causes it to
generate something different for LE than for BE. Not good.
This back-end patch accompanies the changes to altivec.h that change
vec_sld's behavior for little endian. Those changes mean that we see
slightly different code in the back end when trying to recognize a
VSLDOI instruction in isVSLDOIShuffleMask. In particular, a
ShuffleKind of 1 (where the two inputs are identical) must now be
treated the same way as a ShuffleKind of 2 (little endian with
different inputs) when little endian mode is in force. This is
because ShuffleKind of 1 is defined using big-endian numbering.
This has a ripple effect on LowerBUILD_VECTOR, where we create our own
internal VSLDOI instructions. Because these are a ShuffleKind of 1,
they will now have their shift amounts subtracted from 16 when
recognizing the shuffle mask. To avoid problems we have to subtract
them from 16 again before creating the VSLDOI instructions.
There are a couple of other uses of BuildVSLDOI, but these do not need
to be modified because the shift amount is 8, which is unchanged when
subtracted from 16.
llvm-svn: 242296
Bruno Cardoso Lopes [Wed, 15 Jul 2015 15:35:23 +0000 (15:35 +0000)]
Look through PHIs to find additional register sources
- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.
With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:
A:
psllq %mm1, %mm0
movd %mm0, %r9
jmp C
B:
por %mm1, %mm0
movd %mm0, %r9
jmp C
C:
movd %r9, %mm0
pshufw $238, %mm0, %mm0
Becomes:
A:
psllq %mm1, %mm0
jmp C
B:
por %mm1, %mm0
jmp C
C:
pshufw $238, %mm0, %mm0
Differential Revision: http://reviews.llvm.org/D11197
rdar://problem/
20404526
llvm-svn: 242295
Bruno Cardoso Lopes [Wed, 15 Jul 2015 15:35:09 +0000 (15:35 +0000)]
Refactor optimizeUncoalescable logic
- Create a new CopyRewriter for Uncoalescable copy-like instructions
- Change the ValueTracker to return a ValueTrackerResult
This makes optimizeUncoalescable looks more like optimizeCoalescable and
use the CopyRewritter infrastructure.
This is also the preparation for looking up into PHI nodes in the
ValueTracker.
Differential Revision: http://reviews.llvm.org/D11195
llvm-svn: 242294
Rafael Espindola [Wed, 15 Jul 2015 14:48:06 +0000 (14:48 +0000)]
Set comdat when an available_externally thunk is converted to linkonce_odr.
Fixes pr24130.
llvm-svn: 242293
Yaron Keren [Wed, 15 Jul 2015 13:32:23 +0000 (13:32 +0000)]
Add support for armv7-windows-gnu targets to the clang front end.
http://reviews.llvm.org/D11071
Patch by Martell Malone
Reviewed by Reid Kleckner
llvm-svn: 242292
Andrew Wilkins [Wed, 15 Jul 2015 13:17:04 +0000 (13:17 +0000)]
[llgo] update libgo-llgo.so version to match libtool_VERSION
Summary:
libtool_VERSION was changed in gofrontend a while ago,
but CMakeLists.txt in llgo wasn't updated, and so the
install target fails. Not sure how this went unnoticed
for so long.
Reviewers: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11118
llvm-svn: 242291
Andrew Wilkins [Wed, 15 Jul 2015 13:05:35 +0000 (13:05 +0000)]
[llgo] set function personality with SetPersonality
Summary:
If a function requires a landing pad, set the personality function.
Requires D11116.
Reviewers: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11117
llvm-svn: 242290
Andrew Wilkins [Wed, 15 Jul 2015 13:03:08 +0000 (13:03 +0000)]
Expose setPersonalityFn to Go
Summary:
Add Value.SetPersonality to the Go bindings. The Go
bindings' Builder.CreateLandingPad has been updated,
removing the obsolete personality argument.
Background
The personality attribute was removed from LandingPadInst
in r239940, and llvm::Function::setPersonalityFn introduced.
There was no corresponding change to either the C API or
Go bindings. The Go bindings were broken until r239940, but
that change was just to ignore the personality argument.
This broke llgo.
Reviewers: majnemer, pcc
Subscribers: deadalnix, llvm-commits, axw
Differential Revision: http://reviews.llvm.org/D11116
llvm-svn: 242289
Benjamin Kramer [Wed, 15 Jul 2015 12:56:19 +0000 (12:56 +0000)]
[PPC] Disassemble little endian ppc instructions in the right byte order
PR24122. The test is simply a byte swapped version of ppc64-encoding.txt.
llvm-svn: 242288
Peter Collingbourne [Wed, 15 Jul 2015 12:16:25 +0000 (12:16 +0000)]
CFI: Add a default blacklist.
Differential Revision: http://reviews.llvm.org/D11095
llvm-svn: 242287
Peter Collingbourne [Wed, 15 Jul 2015 12:15:56 +0000 (12:15 +0000)]
CodeGen: Improve CFI type blacklisting mechanism.
We now use the sanitizer special case list to decide which types to blacklist.
We also support a special blacklist entry for types with a uuid attribute,
which are generally COM types whose virtual tables are defined externally.
Differential Revision: http://reviews.llvm.org/D11096
llvm-svn: 242286