Commit Graph

18766 Commits

Author SHA1 Message Date
Matthias Braun
256cb9eaaf fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190165 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-06 16:19:22 +00:00
Matt Arsenault
4598bd53ab Use type helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190113 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-06 00:37:24 +00:00
Manman Ren
66bd6729e9 Trying to un-break the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190092 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 19:44:52 +00:00
Manman Ren
bc66071baa Debug Info: Use identifier to reference DIType in base type field of
ptr_to_member.

We introduce a new class DITypeRef that represents a reference to a DIType.
It wraps around a Value*, which can be either an identifier in MDString
or an actual MDNode. The class has a helper function "resolve" that
finds the actual MDNode for a given DITypeRef.

We specialize getFieldAs to return a field that is a reference to a
DIType. To correctly access the base type field of ptr_to_member,
getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef.

Also add a typedef for DITypeIdentifierMap and a helper
generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep
a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually
populate the map.

Verifier is updated accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190081 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 18:48:31 +00:00
Eric Christopher
577056f89c Move accelerator table defines and constants to Dwarf.h since
we're proposing it for DWARF5.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190074 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 18:20:16 +00:00
Eric Christopher
c65d201008 Rename enums to match convention and remove superfluous "dwarf" in names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190067 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 16:55:35 +00:00
Joey Gouly
4897151df6 [ARMv8] Implement the new DMB/DSB operands.
This removes the custom ISD Node: MEMBARRIER and replaces it
with an intrinsic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190055 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 15:35:24 +00:00
Nick Lewycky
c7c07f6e55 Fix typos in assert message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 06:53:59 +00:00
Eric Christopher
1aaf8843dc Clean up some whitespace and comment formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190015 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 00:01:17 +00:00
Nick Kledzik
a38c27be0f Add names for mach-o permissions bits and use the symbol names in place of magic numbers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190013 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 23:53:44 +00:00
Eric Christopher
5afaf5d1c1 Move default dwarf version enum into the llvm dwarf constants rather
than the spec dwarf constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 23:38:29 +00:00
Nick Kledzik
5b34493843 fix typo in enum name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190009 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 23:27:21 +00:00
Andrew Trick
16bb45c5c8 mi-sched: Suppress register pressure tracking when the scheduling window is too small.
If the instruction window is < NumRegs/2, pressure tracking is not
likely to be effective. The scheduler has to process a very large
number of tiny blocks. We want this to be fast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189991 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 21:00:11 +00:00
Andrew Trick
d1d0d37a19 mi-sched: Load clustering is a bit to expensive to enable unconditionally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189990 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 21:00:08 +00:00
Andrew Trick
40b52bb8f2 mi-sched: bypass heuristic checks when regpressure tracking is disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 21:00:02 +00:00
Andrew Trick
42ebb3ad41 Added -misched-regpressure option.
Register pressure tracking is half the complexity of the
scheduler. It's useful to be able to turn it off for compile time and
performance comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 20:59:59 +00:00
Rafael Espindola
775079c227 Rename some variables to match the style guide.
I am about to patch this code, and this makes the diff far more readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189982 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 20:08:46 +00:00
Bill Wendling
ca7b43d01d Remove 'param' label from comments. They aren't used properly here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189970 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 18:48:12 +00:00
Rafael Espindola
9718158222 Revert "Add r159136 back now that pr13124 has been fixed."
This reverts commit r189886.

I found a corner case where this optimization is not valid:

Say we have a "linkonce_odr unnamed_addr" in two translation units:
* In TU 1 this optimization kicks in and makes it hidden.
* In TU 2 it gets const merged with a constant that is *not* unnamed_addr,
  resulting in a non unnamed_addr constant with default visibility.
* The static linker rules for combining visibility them produce a hidden
  symbol, which is incorrect from the point of view of the non unnamed_addr
  constant.

The one place we can do this is when we know that the symbol is not used from
another TU in the same shared object, i.e., during LTO. I will move it there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 16:09:01 +00:00
Alexander Kornienko
280e5eef43 Move generic isPrint and columnWidth implementations to a separate header/source to allow using both generic and system-dependent versions on win32.
Summary:
This is needed so we can use generic columnWidthUTF8 in clang-format on
win32 simultaneously with a separate system-dependent implementations of
isPrint/columnWidth in TextDiagnostic.cpp to avoid attempts to print Unicode
characters using narrow-character interfaces (which is not supported on Windows,
and we'll have to figure out how to handle this).

Reviewers: jordan_rose

Reviewed By: jordan_rose

CC: llvm-commits, klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189952 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 16:00:12 +00:00
Hao Liu
19fdc268c3 Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshrun,sqshrn,uqshr,sqrshrn,uqrshrn,sshll,ushll
 and 4 convert instructions:
      scvtf,ucvtf,fcvtzs,fcvtzu


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189925 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 09:28:24 +00:00
Eric Christopher
886631cc27 Use Intrinsic::ID for the pattern match templates, fixing a signed/unsigned
comparison warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 05:08:32 +00:00
NAKAMURA Takumi
06351cd0ff MCDwarf.h: Prune a few stray \param(s). [-Wdocumentation]
\param should be used to describe individual parameters. Use a command like \a or \c for visual enhancements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189905 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 02:10:32 +00:00
Rafael Espindola
79869ee59a Add r159136 back now that pr13124 has been fixed.
Original message:
If a constant or a function has linkonce_odr linkage and unnamed_addr, mark
hidden. Being linkonce_odr guarantees that it is available in every dso that
needs it. Being a constant/function with unnamed_addr guarantees that the
copies don't have to be merged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189886 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 23:34:36 +00:00
Bill Wendling
17554f3ffb Add comments to the CFI instructions and reformat with clang-format. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189864 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 22:16:52 +00:00
Matt Arsenault
e547c57dbf Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189855 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 21:05:51 +00:00
Joerg Sonnenberger
f57a80f494 Add a Python-like join function to merge a list of strings with a
separator between each two elements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189846 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 20:43:54 +00:00
Joey Gouly
06ef1ed260 [MC] Revert part of my previous change, I was a bit overzealous.
A change to test the previous commit will be coming soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 16:18:19 +00:00
Eric Christopher
27ed5716ef Migrate the DWARF_VERSION constant to 4. It largely needs to go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 16:11:13 +00:00
Joey Gouly
f21c18db9f [MC] AvailableFeatures needs to be a uint64_t to match FeatureBits in MCSubtargetInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 15:03:36 +00:00
Daniel Sanders
fdb6a38913 [mips][msa] Added IntrNoMem and removed Commutative from sub intrinsics.
This changes the SelectionDAG nodes from ISD::INTRINSIC_W_CHAIN to
ISD::INTRINSIC_WO_CHAIN which enables easy lowering to equivalent SelectionDAG
nodes (e.g. __builtin_msa_sub_w -> ISD::SUB) in future patches since nodes
such as ISD::SUB do not have a chain.
It also corrects an obvious mistake, namely that the subtract intrinsics were
marked as being commutative.

As per a similar change in r189106
(http://llvm.org/viewvc/llvm-project?rev=189106&view=rev) there isn’t a new
testcase in this patch since the existing tests should test the intrinsics to
the same standard and the best I can do for a testcase would be a fragile
pass/maybe test of whether memory operations can (and do) cross the intrinsic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189784 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 09:45:20 +00:00
Daniel Sanders
8092b71001 [mips][msa] Added IntrNoMem to the floating-point intrinsics.
This changes the SelectionDAG nodes from ISD::INTRINSIC_W_CHAIN to
ISD::INTRINSIC_WO_CHAIN which enables easy lowering to equivalent SelectionDAG
nodes (e.g. __builtin_msa_fadd_w -> ISD::FADD) in future patches since nodes
such as ISD::FADD do not have a chain.

As per a similar change in r189106
(http://llvm.org/viewvc/llvm-project?rev=189106&view=rev) there isn’t a new
testcase in this patch since the existing tests should test the intrinsics to
the same standard and the best I can do for a testcase would be a fragile
pass/maybe test of whether memory operations can (and do) cross the intrinsic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189782 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 09:35:20 +00:00
Charles Davis
5510728d28 Move everything depending on Object/MachOFormat.h over to Support/MachO.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189728 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-01 04:28:48 +00:00
Benjamin Kramer
4af4cbbced Free PressureDiffs instead of leaking.
Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-31 20:10:01 +00:00
Daniel Dunbar
e179b31bfc [conf] Add config variable to disable crash related overrides.
- We do some nasty things w.r.t. installing or overriding signal handlers in
   order to improve our crash recovery support or interaction with crash
   reporting software, and those things are not necessarily appropriate when
   LLVM is being linked into a client application that has its own ideas about
   how to do things. This gives those clients a way to disable that handling at
   build time.

 - Currently, the code this guards is all Apple specific, but other platforms
   might have the same concerns so I went for a more generic configure
   name. Someone who is more familiar with library embedding on Windows can
   handle choosing which of the Windows/Signals.inc behaviors might make sense
   to go under this flag.

 - This also fixes the proper autoconf'ing of ENABLE_BACKTRACES. The code
   expects it to be undefined when disabled, but the autoconf check was just
   defining it to 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189694 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 20:39:21 +00:00
Andrew Trick
846b31d74a Use LiveRangeQuery for instruction-level liveness queries.
Remove redundant or bug-prone LiveInterval APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189685 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 17:58:49 +00:00
Andrew Trick
663bd99227 mi-sched: update PressureDiffs on-the-fly for liveness.
This removes all expensive pressure tracking logic from the scheduling
critical path of node comparison.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189643 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 04:36:57 +00:00
Andrew Trick
1362dcb589 Replace LiveInterval::killedAt with isKilledAtInstr.
Return true for LRGs that end at EarlyClobber or Register slots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189642 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 04:31:01 +00:00
Andrew Trick
da6fc15f0f mi-sched: improve the generic register pressure comparison.
Only compare pressure within the same set. When multiple sets are
affected, we prioritize the most constrained set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189641 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 04:27:29 +00:00
Andrew Trick
4c60b8a78d mi-sched: Precompute a PressureDiff for each instruction, adjust for liveness later.
Created SUPressureDiffs array to hold the per node PDiff computed during DAG building.

Added a getUpwardPressureDelta API that will soon replace the old
one. Compute PressureDelta here from the precomputed PressureDiffs.

Updating for liveness will come next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189640 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 03:49:48 +00:00
Manman Ren
3a0e9b50f3 DIBuilder: retain a type when created with a unique identifier.
createClassType, createStructType, createUnionType, createEnumerationType,
and createForwardDecl will retain a type when created with a unique identifier,
to make sure they are treated as used even when all uses are replaced with
the identifiers.

Use TrackingVH<MDNode> instead of MDNode in AllRetainTypes, since the created
node can later be updated.

The change will be tested when clients of DIBuilder start to pass in non-empty
unique identifier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189621 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 23:17:54 +00:00
Cameron Esfahani
441c557708 Clean up some usage of Triple. The base class has methods for determining if the target is iOS and Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189604 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 20:23:14 +00:00
Kaelyn Uhrain
9071f68fd2 Fix the following error when NDEBUG is defined:
include/llvm/Support/UnicodeCharRanges.h:56:5: error:
use of this statement in a constexpr constructor is a C++1y extension
[-Werror,-Wc++1y-extensions]
     assert(rangesAreValid());
          ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189599 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 18:49:35 +00:00
Andrew Trick
851bb2c9cb Comment and revise the cyclic critical path code.
This should be much more clear now. It's still disabled pending testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189597 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 18:04:49 +00:00
Alexander Kornienko
2f02ded68a isCharInSet refactoring.
Summary:
Made UnicodeCharSet a class, perform validity checking inside its
constructor instead of each isCharInSet call, use std::binary_search instead of
own implementation.
This patch comes with a necessary change in clang (sent separately).

Reviewers: jordan_rose, klimek

Reviewed By: klimek

CC: cfe-commits, rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189582 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 12:12:13 +00:00
Craig Topper
aae60d1dc4 Move StringToOffsetTable into the TableGen include directory so I can use it in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189567 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 05:09:55 +00:00
Hal Finkel
f208398528 Revert: r189565 - Add getUnrollingPreferences to TTI
Revert unintentional commit (of an unreviewed change).

Original commit message:

Add getUnrollingPreferences to TTI

Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189566 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 03:33:15 +00:00
Hal Finkel
32f258b96a Add getUnrollingPreferences to TTI
Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189565 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 03:29:57 +00:00
Hal Finkel
738073c4aa Add useAA() to TargetSubtargetInfo
There are several optional (off-by-default) features in CodeGen that can make
use of alias analysis. These features are important for generating code for
some kinds of cores (for example the (in-order) PPC A2 core). This adds a
useAA() function to TargetSubtargetInfo to allow these features to be enabled
by default on a per-subtarget basis.

Here is the first use of this function: To control the default of the
-enable-aa-sched-mi feature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189563 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 03:25:05 +00:00
Rui Ueyama
c08bd51181 [Object/COFF] Add coff_aux_weak_external.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189541 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 23:49:30 +00:00