Commit Graph

18286 Commits

Author SHA1 Message Date
Peter Collingbourne
acf4cf7757 Introduce an optimisation for special case lists with large numbers of literal entries.
Our internal regex implementation does not cope with large numbers
of anchors very efficiently.  Given a ~3600-entry special case list,
regex compilation can take on the order of seconds.  This patch solves
the problem for the special case of patterns matching literal global
names (i.e. patterns with no regex metacharacters).  Rather than
forming regexes from literal global name patterns, add them to
a StringSet which is checked before matching against the regex.
This reduces regex compilation time by an order of roughly thousands
when reading the aforementioned special case list, according to a
completely unscientific study.

No test cases.  I figure that any new tests for this code should
check that regex metacharacters are properly recognised.  However,
I could not find any documentation which documents the fact that the
syntax of global names in special case lists is based on regexes.
The extent to which regex syntax is supported in special case lists
should probably be decided on/documented before writing tests.

Differential Revision: http://llvm-reviews.chandlerc.com/D1150

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187732 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 17:48:04 +00:00
Peter Collingbourne
aa80e61b0d Introduce Regex::isLiteralERE function.
This will be used to implement an optimisation for literal entries
in special case lists.

Differential Revision: http://llvm-reviews.chandlerc.com/D1278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187731 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 17:47:59 +00:00
Benjamin Kramer
f8e16c6f5a Don't leak passes if added outside of the area determined by Started/Stopped flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 11:11:11 +00:00
Elena Demikhovsky
13e6e9171f AVX-512 set: added mask operations, lowering BUILD_VECTOR for i1 vector types.
Added intrinsics and tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187717 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 08:52:21 +00:00
Matt Arsenault
6b4dde71cf Minor address space code simplification.
Remove assertion that the verifier should catch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187692 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-03 01:03:12 +00:00
Bob Wilson
244acf3a4b Link with -rdynamic instead of -Wl,-export-dynamic.
Recent versions of the OS X linker support this but follow the existing
OS X linker convention of using an underscore in the option name, i.e.,
-export_dynamic. Rather than changing our configure scripts to check for
that alternate spelling, it is simpler to just use the compiler's -rdynamic
option and let it deal with translating that to the appropriate linker
option. One potential disadvantage of this approach is that the compiler
will typically ignore -rdynamic on platforms where it is not supported, so
the HAVE_LINK_EXPORT_DYNAMIC in config.h will not necessarily show whether
that option has any effect or not. I don't see any in-tree uses of that
macro, so I'm assuming it is OK.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187686 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 22:51:06 +00:00
Matt Arsenault
38140c2bbe Teach EmitGEPOffset about address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187662 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 18:33:34 +00:00
Eric Christopher
be9f508aec Temporarily revert "Debug Info Finder|Verifier: handle DbgLoc attached to
instructions." in an attempt to bring back some bots.

This reverts commit r187609.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187638 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 00:49:44 +00:00
Bill Wendling
61fc8d670f Use function attributes to indicate that we don't want to realign the stack.
Function attributes are the future! So just query whether we want to realign the
stack directly from the function instead of through a random target options
structure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187618 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 21:42:05 +00:00
Rafael Espindola
8cb1d81250 Expose that the unique file ID has a device and a file component.
The use of sd_dev and st_ino has reached libclang, so expose the two components
in UniqueID so that we can use it in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187616 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 21:36:02 +00:00
Daniel Malea
44c8e346c7 Fixed the Intel-syntax X86 disassembler to respect the (existing) option for hexadecimal immediates, to match AT&T syntax. This also brings a new option for C-vs-MASM-style hex.
Patch by Richard Mitton
Reviewed: http://llvm-reviews.chandlerc.com/D1243



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187614 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 21:18:16 +00:00
Manman Ren
f589eef864 Debug Info Finder|Verifier: handle DbgLoc attached to instructions.
Also remove checking of llvm.dbg.sp since it is not used in generating dwarf.

Current state of Finder:
DebugInfoFinder tries to list all debug info MDNodes used in a module. To
list debug info MDNodes used by an instruction, DebugInfoFinder provides
processDeclare, processValue and processLocation to handle DbgDeclareInst,
DbgValueInst and DbgLoc attached to instructions. processModule will go
through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes
used by the CUs.

TODO:
1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We
need to add a list of variables that are used by DbgDeclareInst and
DbgValueInst.
2> MDString fields should be null or isa<MDString> and MDNode fields should be
null or isa<MDNode>. We currently use empty string or int 0 to represent null.
3> Go though Verify functions and make sure that they check field types.
4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each
testing case has a llvm.dbg.cu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187609 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 20:52:39 +00:00
Robert Lytton
4da77f8d5f remove executable permission from IntrinsicsXCore.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187584 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 17:17:59 +00:00
Vladimir Medic
588f408b95 Moving definition of MnemonicContainsDot field from class Instruction to class AsmParser as suggested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 09:25:27 +00:00
Tim Northover
87773c318f AArch64: add initial NEON support
Patch by Ana Pazos.

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187567 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 09:20:35 +00:00
Robert Lytton
691aa094da XCore target: add GCCBuiltin to four intrinsics
The following are made available by clang in the XCore ABI
	__builtin_bitrev
	__builtin_getid
	__builtin_getps
	__builtin_setps

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187566 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 08:41:32 +00:00
Eric Christopher
9d45f914f0 Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187554 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 01:38:16 +00:00
Hans Wennborg
9dd8c0cffe Option parsing: add support for alias arguments.
This makes option aliases more powerful by enabling them to
pass along arguments to the option they're aliasing.

For example, if we have a joined option "-foo=", we can now
specify a flag option "-bar" to be an alias of that, with the
argument "baz".

This is especially useful for the cl.exe compatible clang driver,
where many options are aliases. For example, this patch enables
us to alias "/Ox" to "-O3" (-O is a joined option), and "/WX" to
"-Werror" (again, -W is a joined option).

Differential Revision: http://llvm-reviews.chandlerc.com/D1245

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187537 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 22:44:41 +00:00
Eric Christopher
63a5619410 Make these just inline, not static inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 22:35:06 +00:00
Matt Arsenault
485c7fd76b Revert "Remove isCastable since nothing uses it now"
Apparently dragonegg uses it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187454 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 22:02:14 +00:00
Matt Arsenault
0de6832c16 Remove isCastable since nothing uses it now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187448 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 21:11:17 +00:00
Matt Arsenault
f34dc428fa Change behavior of calling bitcasted alias functions.
It will now only convert the arguments / return value and call
the underlying function if the types are able to be bitcasted.
This avoids using fp<->int conversions that would occur before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187444 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 20:45:05 +00:00
Andrew Trick
c0173e6f9f Down-scale slot index distance to save bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187438 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 19:59:19 +00:00
Andrew Trick
c0c9205811 whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187437 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 19:59:15 +00:00
Andrew Trick
d71efffdcf MI Sched: Track live-thru registers.
When registers must be live throughout the scheduling region, increase
the limit for the register class. Once we exceed the original limit,
they will be spilled, and there's no point further reducing pressure.

This isn't a perfect heuristics but avoids a situation where the
scheduler could become trapped by trying to achieve the impossible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187436 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 19:59:12 +00:00
Daniel Malea
f6de55f5d4 Fix parameter ordering bug in createDebugIRPass()
- Thanks to Ilia Filippov for pointing out the inconsistency!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 16:16:11 +00:00
Rafael Espindola
e0913798bc Make file_status::getUniqueID const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187383 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 21:55:38 +00:00
Rafael Espindola
3ed45fe2be Include st_dev to make the result of getUniqueID actually unique.
This will let us use getUniqueID instead of st_dev directly on clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187378 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 21:26:49 +00:00
Nico Rieck
fdbea5107b Use proper section suffix for COFF weak symbols
32-bit symbols have "_" as global prefix, but when forming the name of
COMDAT sections this prefix is ignored. The current behavior assumes that
this prefix is always present which is not the case for 64-bit and names
are truncated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 13:58:39 +00:00
Rafael Espindola
cf48cf23de Add support for the 's' operation to llvm-ar.
If no other operation is specified, 's' becomes an operation instead of an
modifier. The s operation just creates a symbol table. It is the same as
running ranlib.

We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and
if the symbol table is present, then it is current. We use that to optimize
the most common case: a broken build system that thinks it has to run ranlib.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187353 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 12:40:31 +00:00
Rafael Espindola
15658b2908 Fix -Wdocumentation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187336 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 23:43:28 +00:00
Chandler Carruth
064a68682d Update comments for SSAUpdater to use the modern doxygen comment
standards for LLVM. Remove duplicated comments on the interface from the
implementation file (implementation comments are left there of course).
Also clean up, re-word, and fix a few typos and errors in the commenst
spotted along the way.

This is in preparation for changes to these files and to keep the
uninteresting tidying in a separate commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 22:00:33 +00:00
Elena Demikhovsky
c18f4efc5d Added encoding prefixes for KNL instructions (EVEX).
Added 512-bit operands printing.
Added instruction formats for KNL instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187324 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 08:28:38 +00:00
Chandler Carruth
6c3a95dab5 Thread DataLayout through the callers and into mem2reg. This will be
useful in a subsequent patch, but causes an unfortunate amount of noise,
so I pulled it out into a separate patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187322 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 06:43:11 +00:00
Michael Gottesman
7ffc854002 [APFloat] Removed nextafter from missing operations since it is implemented in APFloat::next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187312 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 21:49:19 +00:00
Nick Lewycky
81e480463d Reimplement isPotentiallyReachable to make nocapture deduction much stronger.
Adds unit tests for it too.

Split BasicBlockUtils into an analysis-half and a transforms-half, and put the
analysis bits into a new Analysis/CFG.{h,cpp}. Promote isPotentiallyReachable
into llvm::isPotentiallyReachable and move it into Analysis/CFG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187283 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 01:24:00 +00:00
Tom Stellard
57e6b2d1f3 SimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch conditions
Merge consecutive if-regions if they contain identical statements.
Both transformations reduce number of branches.  The transformation
is guarded by a target-hook, and is currently enabled only for +R600,
but the correctness has been tested on X86 target using a variety of
CPU benchmarks.

Patch by: Mei Ye

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187278 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 00:01:07 +00:00
Bill Wendling
e130dc6cc9 Use a non-c'tor for converting a boolean into a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 21:50:30 +00:00
Stephen Lin
b390abce16 Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187226 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 18:09:50 +00:00
Stephen Lin
3b6bb79578 Correct case of m_UIToFp to m_UIToFP to match instruction name, add m_SIToFP for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187225 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 17:55:00 +00:00
Matt Arsenault
58376d8ede Re-add DataLayout pointer size convenience functions.
These were reverted in r167222 along with the rest
of the last different address space pointer size attempt.
These will be used in later commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187223 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 17:37:20 +00:00
Eric Christopher
d23cd02ffe Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187217 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 17:13:47 +00:00
Eric Christopher
956e5aa3bd Add a way to get the context of any particular scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187212 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 17:02:36 +00:00
Reid Kleckner
65985348c5 Remove dead or useless header checks from cmake and autoconf
On Windows, this improves clean cmake configuration time on my
workstation from 1m58s to 1m32s, which is pretty significant.  There's
probably more that can be done here, but this is the low hanging fruit.

Eric volunteered to regenerate ./configure for me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187209 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 16:54:23 +00:00
Tobias Grosser
e7bc5bb862 Make .bc en/decoding of AttrKind stable
The bitcode representation attribute kinds are encoded into / decoded from
should be independent of the current set of LLVM attributes and their position
in the AttrKind enum. This patch explicitly encodes attributes to fixed bitcode
values.

With this patch applied, LLVM does not silently misread attributes written by
LLVM 3.3. We also enhance the decoding slightly such that an error message is
printed if an unknown AttrKind encoding was dected.

Bonus: Dropping bitcode attributes from AttrKind is now easy, as old AttrKinds
       do not need to be kept to support the Bitcode reader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187186 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 04:16:55 +00:00
Bill Schmidt
f38cc38fa6 [PowerPC] Support powerpc64le as a syntax-checking target.
This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code.  Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing.  Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The LLVM portions of this patch simply add ppc64le coverage everywhere
that ppc64 coverage currently exists.  There is nothing of any import
worth testing until such time as little-endian code generation is
implemented.  In the corresponding Clang patch, there is a new test
case variant to ensure that correct built-in defines for little-endian
code are generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 01:35:43 +00:00
Bill Wendling
fb5b3eaacb Add a bool->StringRef c'tor to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187166 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 23:06:39 +00:00
Rafael Espindola
6fccaafd8b Remove the mblaze backend from llvm.
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187145 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 18:55:05 +00:00
Bill Wendling
9e2ef7780b Add a way to add a kind-value string pair to an attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187138 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 18:34:24 +00:00
Richard Sandiford
c572005d7b Fix a comment cut-&-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187117 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 10:53:02 +00:00