Commit Graph

194253 Commits

Author SHA1 Message Date
Alexey Samsonov 1f5bcbe918 Re-land part of r230171: fix GoTsanRuntimeCheck with ccache.
llvm-svn: 230247
2015-02-23 19:35:42 +00:00
Chad Rosier 1df9124289 Revert "Revert "Raising minimum required CMake version to 2.8.12.2.""
This reverts commit r230240, which was an accidental commit.

llvm-svn: 230246
2015-02-23 19:34:04 +00:00
Eric Christopher ed47b22951 Rewrite the global merge pass to be subprogram agnostic for now.
It was previously using the subtarget to get values for the global
offset without actually checking each function as it was generating
code. Go ahead and solidify the current behavior and make the
existing FIXMEs more prominent.

As a note the ARM backend previously had a thumb1 and non-thumb1
set of defaults. Only the former was tested so I've changed the
behavior to only use that for now.

llvm-svn: 230245
2015-02-23 19:28:45 +00:00
Justin Bogner e4ca441a65 InstrProf: Run clang-format to fix some strange indentation (NFC)
Somehow this file ended up with a strange hybrid of the old "indent
inside a namespace" style and the new "don't", giving us a wonderful
two-space indent starting halfway through a namespace. Fix it.

llvm-svn: 230244
2015-02-23 19:27:00 +00:00
Reid Kleckner c4da9c8e50 -fms-extensions: Bump the default _MSC_VER from 1700 to 1800, aka VS2013
VS 2013 is the minimum supported version, so it's reasonable for Clang
to simulate this by default. This also simplifies the clang-cl
self-host, since we have the 18.00 version check.

llvm-svn: 230243
2015-02-23 19:25:48 +00:00
Alexey Samsonov 562145c4e1 Add -fdefine-sized-deallocation to ASan test case.
This flag is now needed to force Clang emit the weak definition
of sized delete if it's not present in the header.

llvm-svn: 230242
2015-02-23 19:18:31 +00:00
Chad Rosier 543900539f Prevent hoisting fmul from THEN/ELSE to IF if there is fmsub/fmadd opportunity.
This patch adds the isProfitableToHoist API.  For AArch64, we want to prevent a
fmul from being hoisted in cases where it is more profitable to form a
fmsub/fmadd.

Phabricator Review: http://reviews.llvm.org/D7299
Patch by Lawrence Hu <lawrence@codeaurora.org>

llvm-svn: 230241
2015-02-23 19:15:16 +00:00
Chad Rosier 7c3310694c Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit 247aed4710e8befde76da42b27313661dea7cf66.

llvm-svn: 230240
2015-02-23 19:15:08 +00:00
Reid Kleckner e13b76591e cmake: Don't do the libstdc++ version check when clang simulates MSVC
If we're using clang-cl, that's a pretty good indication that we're
going to use MSVC's STL.

This simplifies the clang-cl ninja self-host configuration down to:
CC=clang-cl CXX=clang-cl cmake .. -GNinja

Modified version of zturner's patch:
Differential Revision: http://reviews.llvm.org/D7824

llvm-svn: 230239
2015-02-23 19:07:25 +00:00
Mehdi Amini cd3ca6f7dd InstSimplify: simplify 0 / X if nnan and nsz
From: Fiona Glaser <fglaser@apple.com>
llvm-svn: 230238
2015-02-23 18:30:25 +00:00
Hafiz Abid Qadeer cf0698987b Fix a problem where lldb-mi would not stop the debuggee after -exec-interrupt command.
Summary:
This revision fixes a problem where lldb-mi would not stop the execution after exec-interrupt call.
On Linux, SIGSTOP is used to stop the debuggee process. LLDB stopped the debuggee alright. But when
lldb-mi received the notification of stopping with reason as SIGSTOP, it would resume the process.
This was heppening in CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal. This function aslo
used hard coded numbers for signal istead of symbolic names.

This revision changes code to treat SIGSTOP reason as SIGINT. Also used symbolic names for signals
instead of numbers.

Reviewers: ki.stfu, clayborg

Reviewed By: ki.stfu, clayborg

Subscribers: zturner, lldb-commits

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

llvm-svn: 230237
2015-02-23 18:27:17 +00:00
Ed Maste ff1b5c4244 Add null RegisterContext assertions
This makes these failures slightly more obvious, avoiding the need to
run LLDB under a debugger or rely on a LLDB core.  I encountered these
while bringing up a new OS/arch combination.

llvm-svn: 230236
2015-02-23 18:12:20 +00:00
Daniel Sanders afe27c7d27 [mips] Honour -mno-odd-spreg for vector insert/extract when MSA is enabled.
Summary:
-mno-odd-spreg prohibits the use of odd-numbered single-precision floating
point registers. However, vector insert/extract was still using them when
manipulating the subregisters of an MSA register. Fixed this by ensuring
that insertion/extraction is only performed on even-numbered vector
registers when -mno-odd-spreg is given.

Reviewers: vmedic, sstankovic

Reviewed By: sstankovic

Subscribers: llvm-commits

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

llvm-svn: 230235
2015-02-23 17:22:16 +00:00
Bob Wilson 89e94fc3ad Fix incorrect immediate size for AddrModeT2_i8s4 in rewriteT2FrameIndex.
The natural way to handle this addressing mode would be to say that it has
8 bits and gets scaled by 4, but since the MC layer is expecting the scaling
to be already reflected in the immediate value, we have been setting the
Scale to 1. That's fine, but then NumBits needs to be adjusted to reflect
the effective increase in the range of the immediate. That adjustment was
missing.

The consequence is that the register scavenger can fail.
The estimateRSStackSizeLimit() function in ARMFrameLowering.cpp correctly
assumes that the AddrModeT2_i8s4 address mode can handle scaled offsets up to
1020. Under just the right circumstances, we fail to reserve space for the
scavenger because it thinks that nothing will be needed. However, the overly
pessimistic behavior in rewriteT2FrameIndex causes some frame indexes to be
out of range and require scavenged registers, and so the scavenger asserts.

Unfortunately I have not been able to come up with a testcase for this. I
can only reproduce it on an internal branch where the frame layout and
register allocation is slightly different than trunk. We really need a
way to serialize MachineInstr-level IR to write reasonable tests for things
like this.

rdar://problem/19909005

llvm-svn: 230233
2015-02-23 16:57:19 +00:00
Benjamin Kramer 654a85e2ee Sync the __builtin_expects for our 3 quadratically probed hash table implementations.
This assumes that
  a) finding the bucket containing the value is LIKELY
  b) finding an empty bucket is LIKELY
  c) growing the table is UNLIKELY

I also switched the a) and b) cases for SmallPtrSet as we seem to use
the set mostly more for insertion than for checking existence.

In a simple benchmark consisting of 2^21 insertions of 2^20 unique
pointers into a DenseMap or SmallPtrSet a few percent speedup on average,
but nothing statistically significant.

llvm-svn: 230232
2015-02-23 16:41:36 +00:00
Johannes Doerfert f9e3462b69 [FIX] 2 broken tests
llvm-svn: 230231
2015-02-23 16:34:20 +00:00
Johannes Doerfert 4f8ac3d123 Use ScalarEvolution to create tight bounds on the parameters
llvm-svn: 230230
2015-02-23 16:15:51 +00:00
Bruno Cardoso Lopes 1cacda086f [X86] Add specific mtriple in order to appease builbots
llvm-svn: 230229
2015-02-23 15:33:40 +00:00
Ed Maste 3a8ab6ee2a Exit early from DumpELFProgramHeaders if parse fails
This matches the way DumpELFSectionHeaders is implemented and is
recommended by the LLVM coding conventions.

llvm-svn: 230228
2015-02-23 15:33:11 +00:00
Ed Maste aec140380f elf-core: correct "no sections" to "no segments."
The error reported here is that there are no phdr entries, so it's
referring to segments, not sections.

llvm-svn: 230227
2015-02-23 15:28:42 +00:00
Bruno Cardoso Lopes f488e2ae69 [X86][MMX] Add MMX instructions to foldable tables
Teach the peephole optimizer to work with MMX instructions by adding
entries into the foldable tables. This covers folding opportunities not
handled during isel.

llvm-svn: 230226
2015-02-23 15:23:22 +00:00
Bruno Cardoso Lopes 9e1c4c17d9 [X86][MMX] Support folding loads in psll, psrl and psra intrinsics
llvm-svn: 230225
2015-02-23 15:23:14 +00:00
Bruno Cardoso Lopes 7bd67830d1 [X86][MMX] Add tests for pslli, psrli and psrai intrinsics
Add tests to cover the RR form of the pslli, psrli and psrai intrinsics.
In the next commit, the loads are going to be folded and the
instructions use the RM form.

llvm-svn: 230224
2015-02-23 15:23:06 +00:00
Elena Demikhovsky 52e81bc499 AVX-512: recommitted 229837 + bugfix + test
llvm-svn: 230223
2015-02-23 15:12:31 +00:00
Johannes Doerfert fb79a96d42 [NFC] Unify the use of Context.CurRegion
llvm-svn: 230222
2015-02-23 14:18:28 +00:00
Elena Demikhovsky 145e5b4409 restructured X86 scalar unary operation templates
I made the templates general, no need to define pattern separately for each instruction/intrinsic.
Now only need to add r_Int pattern for AVX.

llvm-svn: 230221
2015-02-23 14:14:02 +00:00
Johannes Doerfert b4f08eb671 [REFACTOR] Replace Pass* from BlockGen by the DomTree
llvm-svn: 230220
2015-02-23 13:51:35 +00:00
Shankar Easwaran 8198cfd8a7 [ELF][Writer] Use llvm::StringMap instead
Cleanup.

llvm-svn: 230219
2015-02-23 13:50:23 +00:00
Shankar Easwaran 97dae2a0cd [ELF] Add comments in the ELF reader
Address review comments from Ruiu, and add some more TODO's.

llvm-svn: 230218
2015-02-23 13:25:44 +00:00
Benjamin Kramer d0be170414 [llvm-pdbdump] Remove unused variables.
llvm-svn: 230216
2015-02-23 11:33:54 +00:00
Pavel Labath 9349671488 Disable file descriptor leak tests on python >=2.7.8
this version introduced an internal leak, which we cannot reasonably fix.

llvm-svn: 230215
2015-02-23 11:14:28 +00:00
NAKAMURA Takumi 56335e33b3 Orc/JITSymbol.h requires not "Compiler.h" but "DataTypes.h" due to uint64_t.
llvm-svn: 230214
2015-02-23 11:12:52 +00:00
Tamas Berghammer 0f86b74304 Fix the communication in qPlatform_[mkdir,chmod]
With the previous implementation the protocol used by the client and the
server for the response was different and worked only by an accident.
With this change the communication is fixed and the return code from
mkdir and chmod correctly captured by lldb. The change also add
documentation for the qPlatform__[mkdir,chmod] packages.

Differential revision: http://reviews.llvm.org/D7786

llvm-svn: 230213
2015-02-23 11:03:08 +00:00
Tamas Berghammer 04e6314cf4 Set error status when failed to catch stop after launch
Process::Launch try to catch a stop signal after launching a process. If
it is unsuccessful it destroy the process but previously still reported
that the process launched successfully. This behavior caused a
deadlock. With thic change the process launch error reported correctly.

Differential revision: http://reviews.llvm.org/D7784

llvm-svn: 230212
2015-02-23 10:59:54 +00:00
Pavel Labath dbb41cf418 Support evaluation of DWARF expressions setting CFA
Summary:
This patch enables evaluation of DWARF expressions setting the CFA during stack unwinding.

This makes TestSigtrampUnwind "almost" pass on linux. I am not enabling the test yet since the
symbol name for the signal trampoline does not get resolved properly due to a different bug, but
apart from that, the backtrace is sane.

I am unsure how this change affects Mac. I think it makes the unwinder prefer the DWARF unwind
plan instead of some custom platform-dependant plan. However, it does not affect the end result
- the stack unwinding works as expected.

Reviewers: jasonmolenda

Subscribers: lldb-commits

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

llvm-svn: 230211
2015-02-23 10:29:01 +00:00
Pavel Labath ab970f5e08 UnwindPlan::Row refactor -- add support for CFA set by a DWARF expression
Summary:
This change refactors UnwindPlan::Row to be able to store the fact that the CFA is value is set
by evaluating a dwarf expression (DW_CFA_def_cfa_expression). This is achieved by creating a new
class CFAValue and moving all CFA setting/getting code there. Note that code using the new
CFAValue::isDWARFExpression is not yet present and will be added in a follow-up patch. Therefore,
this patch should not change the functionality in any way.

Test Plan: Ran tests on Mac and Linux. No regressions detected.

Reviewers: jasonmolenda, clayborg

Subscribers: lldb-commits

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

llvm-svn: 230210
2015-02-23 10:19:16 +00:00
Mohit K. Bhakkad 69963e72f3 [TSan][Clang][MIPS] Enabled thread option for MIPS64 platform
Reviewers: kcc, samsonov, petarj, eugenis

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

llvm-svn: 230209
2015-02-23 09:32:35 +00:00
Ed Schouten f6d492e683 Use compiler provided endianness definitions if available.
This makes int_endianness.h work on operating systems for which we
haven't written explicit constructs, as long as GCC or Clang are being
used.

llvm-svn: 230208
2015-02-23 09:27:49 +00:00
Ed Schouten 4992099b42 Add C11 *_DECIMAL_DIG.
Before C11 there was only the DECIMAL_DIG definition. As of C11, we now
have one definition per floating point type (e.g. DBL_DECIMAL_DIG).
Change the existing code to define the new versions. To remain backward
compatible, define __DECIMAL_DIG__ as __LDBL_DECIMAL_DIG__.

Also update the tests. It seems that some of the existing test vectors
were incorrect. Change all tests for __DECIMAL_DIG__ to expect
__LDBL_DECIMAL_DIG__. Add tests for *_DECIMAL_DIG for FreeBSD/amd64, as
I happen to have such a system laying around. I've validated that the
values are in sync with <float.h>.

llvm-svn: 230207
2015-02-23 09:12:31 +00:00
David Majnemer eba692dd28 AsmParser: Check ConstantExpr insertvalue operands for type correctness
llvm-svn: 230206
2015-02-23 07:13:52 +00:00
Zachary Turner d8edf21c34 [llvm-pdbdump] Fix builders again.
llvm-svn: 230205
2015-02-23 06:13:27 +00:00
Zachary Turner bc42da0326 [llvm-pdbdump] Very minor code cleanup.
This just removes some dead enums as well as some debug flushes
of stdout.

llvm-svn: 230204
2015-02-23 05:59:14 +00:00
Zachary Turner 29c69105fb [llvm-pdbdump] Add an option to dump full class definitions.
This adds the --class-definitions flag.  If specified, when dumping
types, instead of "class Foo" you will see the full class definition,
with member functions, constructors, access specifiers.

NOTE: Using this option can be very slow, as generating a full class
definition requires accessing many different parts of the PDB.

llvm-svn: 230203
2015-02-23 05:58:34 +00:00
Lang Hames 203540f2d6 [Orc][Kaleidoscope] Tidy up the lazy_irgen tutorial, touch up a couple of
comments in the fully_lazy tutorial to minimize the diff between the two.

llvm-svn: 230202
2015-02-23 04:45:05 +00:00
Lang Hames 193504ac58 [Orc][Kaleidoscope] Remove dead AST map in SessionContext.
llvm-svn: 230201
2015-02-23 04:34:43 +00:00
Nico Weber 932c1f4dc8 Try to fix reST markup for an external link.
llvm-svn: 230200
2015-02-23 03:31:29 +00:00
Nico Weber 6c4f606c08 Remove comment addressed by d0k in r229327.
llvm-svn: 230199
2015-02-23 02:23:19 +00:00
Alexander Kornienko 01c2da1e09 Fixed script name in the clang-tidy documentation.
llvm-svn: 230198
2015-02-23 01:12:41 +00:00
David Blaikie a70504c3c3 Fix Makefile build
llvm-svn: 230197
2015-02-23 00:53:35 +00:00
David Blaikie e960a4e39b [orc] Add a trivial unit test to get the ball rolling
I made my best guess at the Makefile, since I don't have a make build.

I'm not sure if it should be valid to add an empty list of things, but
it seemed the sort of degenerate case.

llvm-svn: 230196
2015-02-23 00:36:25 +00:00