Commit Graph

194227 Commits

Author SHA1 Message Date
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
Shankar Easwaran 9e07346679 [ELF] Add section group/COMDAT support.
SHF_GROUP: Group Member Sections
----------------------------------
A section which is part of a group, and is to be retained or discarded with the
group as a whole, is identified by a new section header attribute: SHF_GROUP
This section is a member (perhaps the only one) of a group of sections, and the
linker should retain or discard all or none of the members. This section must be
referenced in a SHT_GROUP section. This attribute flag may be set in any section
header, and no other modification or indication is made in the grouped sections.
All additional information is contained in the associated SHT_GROUP section.

SHT_GROUP: Section Group Definition
-------------------------------------
Represents a group section.

The section group's sh_link field identifies a symbol table section, and its
sh_info field the index of a symbol in that section. The name of that symbol is
treated as the identifier of the section group.

More information: https://mentorembedded.github.io/cxx-abi/abi/prop-72-comdat.html

Added a lot of extensive tests, that tests functionality.

llvm-svn: 230195
2015-02-23 00:30:00 +00:00
Shankar Easwaran de4a31909f [ELF] Add .gnu.linkonce support.
When the GNU linker sees two input sections with the same name, and the name
starts with ".gnu.linkonce.", the linker will only keep one copy and discard the
other. Any section whose name starts with “.gnu.linkonce.” is a COMDAT section.

Some architectures like Hexagon use this section to store floating point constants,
that need be deduped.

This patch adds gnu.linkonce functionality to the ELFReader.

llvm-svn: 230194
2015-02-23 00:04:49 +00:00
David Majnemer 8d22abdd59 AsmParser: Call instructions can't have an alignment
llvm-svn: 230193
2015-02-23 00:01:32 +00:00
Shankar Easwaran a1d3637f3d [Core,MachO,Test] Remove trailing whitespace.
llvm-svn: 230192
2015-02-22 23:54:38 +00:00
Shankar Easwaran 784b56caac [ELF] Add symbol to ELFReference.
Relocation handling need more information about the Symbol that we are creating
references for.

No change in functionality.

llvm-svn: 230191
2015-02-22 23:46:21 +00:00
Shankar Easwaran e44fc87cde [Core] Fix handling of Section Groups.
There is code(added by me) in the YAMLReader which isn't correct when it handles references
for section groups. The test case was also checking for wrong outputs.

This fixes the bug and the testcase so that they check for proper outputs.

llvm-svn: 230190
2015-02-22 23:40:58 +00:00
Shankar Easwaran 45b392d6cf [ELF][X86_64] R_X86_64_16 relocation support
llvm-svn: 230189
2015-02-22 23:32:34 +00:00
David Majnemer 00303b6861 AsmParser: Check ConstantExpr GEP operands for validity
llvm-svn: 230188
2015-02-22 23:14:52 +00:00
David Majnemer 3f45d40663 llvm-pdbdump: Fix gcc/clang build
llvm-svn: 230187
2015-02-22 22:33:57 +00:00
Zachary Turner aea59921ac [llvm-pdbdump] Fix a few compilation failures.
llvm-svn: 230186
2015-02-22 22:20:26 +00:00
David Blaikie 1c750818a0 Add missing header
llvm-svn: 230185
2015-02-22 22:18:55 +00:00
Zachary Turner 9a818ad193 [llvm-pdbdump] Rewrite dumper using visitor pattern.
This increases the flexibility of how to dump different
symbol types -- necessary for context-sensitive formatting of
symbol types -- and also improves the modularity by allowing
the dumping to be implemented in the actual dumper, as opposed
to in the PDB library.

llvm-svn: 230184
2015-02-22 22:03:38 +00:00
Ismail Pazarbasi 87f4c90a5c Unix/BSD system calls are prefixed with SYS_ on FreeBSD and Mac
Also, __syscall form should be used when one or more of the
parameters is a 64-bit argument to ensure that argument alignment
is correct.

llvm-svn: 230183
2015-02-22 22:01:09 +00:00
Zachary Turner fc4ecedb75 [llvm-pdbdump] Simplify options and output.
This removes a wealth of options, and instead now only provides
three options.  -symbols, -types, and -compilands.  This greatly
simplifies use of the tool, and makes it easier to understand
what you're going to see when you run the tool.

llvm-svn: 230182
2015-02-22 21:45:38 +00:00
David Blaikie 5e5d7840fb Roll condition into an assert then wrap it 'ifndef NDEBUG' to protect from the inevitable "unused variable" warning in a non-asserts build.
llvm-svn: 230181
2015-02-22 20:58:38 +00:00
JF Bastien 30bf96bfe7 Use common parse routine to read alignment values from bitcode
While fuzzing LLVM bitcode files, I discovered that (1) the bitcode reader doesn't check that alignments are no larger than 2**29; (2) downstream code doesn't check the range; and (3) for values out of range, corresponding large memory requests (based on alignment size) will fail. This code fixes the bitcode reader to check for valid alignments, fixing this problem.

This CL fixes alignment value on global variables, functions, and instructions: alloca, load, load atomic, store, store atomic.

Patch by Karl Schimpf (kschimpf@google.com).

llvm-svn: 230180
2015-02-22 19:32:03 +00:00
Renato Golin 4b1482e75c Revert "[ASan] Make the argument of '__sanitizer_annotate_contiguous_container' is not aligned error message easier to understand"
This reverts commit r230019, as it was breaking the ARM sanitizer buildbot
and let other errors be introduced since it wasn't fixed/reverted in
time.

llvm-svn: 230179
2015-02-22 18:58:18 +00:00
Hal Finkel 3d4269ab05 [LICM] Refactor to expose functionality as utility functions
This refactors the core functionality of LICM: HoistRegion, SinkRegion and
PromoteAliasSet (renamed to promoteLoopAccessesToScalars) as utility functions
in LoopUtils. This will enable other transformations to make use of them
directly.

Patch by Ashutosh Nema.

llvm-svn: 230178
2015-02-22 18:35:32 +00:00
Simon Pilgrim 4e30d9b6d8 [DagCombiner] Generalized BuildVector Vector Concatenation
The CONCAT_VECTORS combiner pass can transform the concat of two BUILD_VECTOR nodes into a single BUILD_VECTOR node.

This patch generalises this to support any number of BUILD_VECTOR nodes, and also permits UNDEF nodes to be included as well.

This was noticed as AVX vec128 -> vec256 canonicalization sometimes creates a CONCAT_VECTOR with a real vec128 lower and an vec128 UNDEF upper.

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

llvm-svn: 230177
2015-02-22 18:17:28 +00:00
Hal Finkel e2dd84e42f [DAGCombine] Don't assume integer-type legailty in reduceBuildVecConvertToConvertBuildVec
DAGCombine will rewrite an BUILD_VECTOR where all non-undef inputs some from
[US]INT_TO_FP, as a BUILD_VECTOR of integers with the conversion applied as a
vector operation. We check operation legality of the conversion, but fail to
check legality of the integer vector type itself. Because targets don't
normally override operation legality defaults for illegal types, we need to
check this also.

This came up in the context of the QPX vector entensions for PowerPC (which can
have legal floating-point vector types without corresponding legal integer
vector types). No in-tree test case for this yes, but one can be added once
the QPX support has been committed.

llvm-svn: 230176
2015-02-22 16:10:22 +00:00
Hal Finkel f5b957060b [SDAG] Use correct alignments on expanded vector trunc-store/ext-loads
When expanding a truncating store or extending load using vector extracts or
inserts and scalar stores and loads, we were giving each of these scalar stores
or loads the same alignment as the original vector operation. While this will
often be right (most vector operations, especially those produced by
autovectorization, have the alignment of the underlying scalar type), the
vector operation could certainly have a larger alignment.

No test case (yet); noticed by inspection.

llvm-svn: 230175
2015-02-22 15:58:04 +00:00
Dmitri Gribenko 9cbc6f42aa Revert r230171 "TSan runtime: unbreak the build with ccache"
It broke a buildbot with a non-clang (?) compiler.

llvm-svn: 230174
2015-02-22 12:20:05 +00:00
Kuba Brecka 3280dc7081 Whitespace fix for r230172.
llvm-svn: 230173
2015-02-22 11:49:21 +00:00
Kuba Brecka 11bb33c78b Fix gc-test.cc to work under higher -O levels
The gc-test.cc tries underflows of a variable up to -32 bytes, but on i386, the left redzone is not 32 bytes, it’s only 16 bytes and therefore the access to var[-32] is completely off. The reason why this test didn’t fail before is that we’ve been lucky and there was another variable before the var array, which was also instrumented. This fix uses “-32” for 64-bit systems and “-16” for 32-bit.

Reviewed at http://reviews.llvm.org/D7809

llvm-svn: 230172
2015-02-22 11:12:17 +00:00
Dmitri Gribenko bc4c42c345 TSan runtime: unbreak the build with ccache
llvm-svn: 230171
2015-02-22 11:04:59 +00:00
NAKAMURA Takumi 3d61760bd6 Fix a warning on HexagonMCCodeEmitter::MCII. [-Wunused-private-field]
llvm-svn: 230170
2015-02-22 09:58:29 +00:00