Commit Graph

154019 Commits

Author SHA1 Message Date
Davide Italiano
7902ceb443 [TTI] Initialize a value to trigger a crash deterministically.
We expect the pointer to be initialized by the above loop, but
if that's not executed, the contents are garbage.
A fix for the crash will be committed immediately after.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312353 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 19:36:34 +00:00
Daniel Berlin
29492fbac5 NewGVN: Make sure we don't incorrectly use PredicateInfo when doing PHI of ops
Summary: When we backtranslate expressions, we can't use the predicateinfo, since we are evaluating them in a different context.

Reviewers: davide, mcrosier

Subscribers: sanjoy, Prazek, llvm-commits

Differential Revision: https://reviews.llvm.org/D37174

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312352 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 19:20:18 +00:00
Matt Arsenault
757642511d AMDGPU: Add ds_{read|write}_addtid_b32 definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312349 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 18:38:02 +00:00
Matthias Braun
01b6128d90 LiveIntervalAnalysis: Fix alias regunit reserved definition
A register in CodeGen can be marked as reserved: In that case we
consider the register always live and do not use (or rather ignore)
kill/dead/undef operand flags.

LiveIntervalAnalysis however tracks liveness per register unit (not per
register). We already needed adjustments for this in r292871 to deal
with super/sub registers. However I did not look at aliased register
there. Looking at ARM:

FPSCR (regunits FPSCR, FPSCR~FPSCR_NZCV) aliases with FPSCR_NZCV
(regunits FPSCR_NZCV, FPSCR~FPSCR_NZCV) hence they share a register unit
(FPSCR~FPSCR_NZCV) that represents the aliased parts of the registers.
This shared register unit was previously considered non-reserved,
however given that we uses of the reserved FPSCR potentially violate
some rules (like uses without defs) we should make FPSCR~FPSCR_NZCV
reserved too and stop tracking liveness for it.

This patch:
- Defines a register unit as reserved when: At least for one root
  register, the root register and all its super registers are reserved.
- Adjust LiveIntervals::computeRegUnitRange() for new reserved
  definition.
- Add MachineRegisterInfo::isReservedRegUnit() to have a canonical way
  of testing.
- Stop computing LiveRanges for reserved register units in HMEditor even
  with UpdateFlags enabled.
- Skip verification of uses of reserved reg units in the machine
  verifier (this usually didn't happen because there would be no cached
  liverange but there is no guarantee for that and I would run into this
  case before the HMEditor tweak, so may as well fix the verifier too).

Note that this should only affect ARMs FPSCR/FPSCR_NZCV registers today;
aliased registers are rarely used, the only other cases are hexagons
P0-P3/P3_0 and C8/USR pairs which are not mixing reserved/non-reserved
registers in an alias.

Differential Revision: https://reviews.llvm.org/D37356

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312348 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 18:36:26 +00:00
Matt Arsenault
6a29a225d2 AMDGPU: Add most d16 load/store instruction definitions
Doesn't include the tied operand necessary for the loads,
but is enough for the assembler to work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 18:36:06 +00:00
Justin Bogner
c58d273d61 llvm-isel-fuzzer: Add link-time dependency on BitWriter
This should fix the undefined reference to WriteBitcodeToFile here:
http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/31682

(Why does every different bot seem to have a different level of
finickiness about LLVM_LINK_COMPONENTS?)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 17:49:54 +00:00
Justin Bogner
25604ec16e llvm-isel-fuzzer: Add link-time dependency on BitReader
This should fix the undefined reference to parseBitcodeFile here:
http://bb.pgr.jp/builders/llvm-i686-linux-RA/builds/5785

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 17:34:21 +00:00
Sam Clegg
8b020d7228 [WebAssembly] Update relocation names to match spec
Summary: See https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md

Differential Revision: https://reviews.llvm.org/D37385

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312342 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 17:32:01 +00:00
Justin Bogner
14e931db54 Specify the namespace in llvm::make_unique to fix the windows build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312341 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 17:26:24 +00:00
Sam Clegg
e38fd9fa36 [WebAssembly] Fix getSymbolValue for exported globals
The code wasn't previously taking into account that the
global index space is not same as the into in the Globals
array since the latter does not include imported globals.

This fixes the WebAssembly waterfall failures.

Differential Revision: https://reviews.llvm.org/D37384

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 17:24:19 +00:00
Justin Bogner
8cb6b3ebf8 llvm-isel-fuzzer: Make buildable and testable without libFuzzer
This adds a dummy main so we can build and run the llvm-isel-fuzzer
functionality when we aren't building LLVM with coverage. The approach
here should serve as a template to stop in-tree fuzzers from
bitrotting (See llvm.org/pr34314).

Note that I'll probably move most of the logic in DummyISelFuzzer's
`main` to a library so it's easy to reuse it in other fuzz targets,
but I'm planning on doing that in a follow up that also consolidates
argument handling in our LLVMFuzzerInitialize implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312338 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 17:02:22 +00:00
Nicolai Haehnle
96b6414540 AMDGPU: IMPLICIT_DEFs and DBG_VALUEs do not contribute to wait states
Summary:
This fixes a bug that was exposed on gfx9 in various
GL45-CTS.shaders.loops.*_iterations.select_iteration_count_fragment tests,
e.g. GL45-CTS.shaders.loops.do_while_uniform_iterations.select_iteration_count_fragment

Reviewers: arsenm

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D36193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312337 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 16:56:32 +00:00
Craig Topper
fc13e66509 [X86] Add test case I forgot to commit with r312285.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312335 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 16:40:24 +00:00
Peter Collingbourne
043998b329 ModuleSummaryAnalysis: Correctly handle refs from function inline asm to module inline asm.
If a function contains inline asm and the module-level inline asm
contains the definition of a local symbol, prevent the function from
being imported in case the function-level inline asm refers to a
symbol in the module-level inline asm.

Differential Revision: https://reviews.llvm.org/D37370

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312332 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 16:24:02 +00:00
Manoj Gupta
5d292d77f5 [LoopVectorizer] Use two step casting for float to pointer types.
Summary:
LoopVectorizer is creating casts between vec<ptr> and vec<float> types
on ARM when compiling OpenCV. Since, tIs is illegal to directly cast a
floating point type to a pointer type even if the types have same size
causing a crash. Fix the crash using a two-step casting by bitcasting
to integer and integer to pointer/float.
Fixes PR33804.

Reviewers: mkuper, Ayal, dlj, rengolin, srhines

Reviewed By: rengolin

Subscribers: aemerson, kristof.beyls, mkazantsev, Meinersbur, rengolin, mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D35498

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 15:36:00 +00:00
Alexandre Isoard
3b88873b05 [SCEV] Add URem support to SCEV
In LLVM IR the following code:

    %r = urem <ty> %t, %b

is equivalent to

    %q = udiv <ty> %t, %b
    %s = mul <ty> nuw %q, %b
    %r = sub <ty> nuw %t, %q ; (t / b) * b + (t % b) = t

As UDiv, Mul and Sub are already supported by SCEV, URem can be implemented
with minimal effort using that relation:

    %r --> (-%b * (%t /u %b)) + %t

We implement two special cases:

  - if %b is 1, the result is always 0
  - if %b is a power-of-two, we produce a zext/trunc based expression instead

That is, the following code:

    %r = urem i32 %t, 65536

Produces:

    %r --> (zext i16 (trunc i32 %a to i16) to i32)

Note that while this helps get a tighter bound on the range analysis and the
known-bits analysis, this exposes some normalization shortcoming of SCEVs:

    %div = udim i32 %a, 65536
    %mul = mul i32 %div, 65536
    %rem = urem i32 %a, 65536
    %add = add i32 %mul, %rem

Will usually not be reduced.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312329 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 14:59:59 +00:00
Geoff Berry
d168a77ec3 Re-enable "[MachineCopyPropagation] Extend pass to do COPY source forwarding"
Issues addressed since original review:
- Moved removal of dead instructions found by
  LiveIntervals::shrinkToUses() outside of loop iterating over
  instructions to avoid instructions being deleted while pointed to by
  iterator.
- Fixed ARMLoadStoreOptimizer bug exposed by this change in r311907.
- The pass no longer forwards COPYs to physical register uses, since
  doing so can break code that implicitly relies on the physical
  register number of the use.
- The pass no longer forwards COPYs to undef uses, since doing so
  can break the machine verifier by creating LiveRanges that don't
  end on a use (since the undef operand is not considered a use).

  [MachineCopyPropagation] Extend pass to do COPY source forwarding

  This change extends MachineCopyPropagation to do COPY source forwarding.

  This change also extends the MachineCopyPropagation pass to be able to
  be run during register allocation, after physical registers have been
  assigned, but before the virtual registers have been re-written, which
  allows it to remove virtual register COPY LiveIntervals that become dead
  through the forwarding of all of their uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312328 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 14:27:20 +00:00
Clement Courbet
50c7531ed4 [MergeICmps] Fix build of rL312315 on clang-with-thin-lto-windows:
MergeICmps.cpp(68,15): error: chosen constructor is explicit in copy-initialization
      return {};
APInt.h(339,12): note: explicit constructor declared here
  explicit APInt() : BitWidth(1) { U.VAL = 0; }
             ^
MergeICmps.cpp(56,9): note: in implicit initialization of field 'Offset' with omitted
initializer
  APInt Offset;
          ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 11:51:23 +00:00
Strahinja Petrovic
88eda0cc8a Adding missing test case in rL312318
Adding test for debug info for integer 
variables whose type is shrinked to bool.

Patch by Nikola Prica.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312325 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 11:37:53 +00:00
Diana Picus
6470656cc2 [ARM] GlobalISel: Support ROPI global variables
In the ROPI relocation model, read-only variables are accessed relative
to the PC. We use the (MOV|LDRLIT)_ga_pcrel pseudoinstructions for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312323 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 11:13:39 +00:00
Clement Courbet
4855d2de9a Reland rL312315: [MergeICmps] MergeICmps is a new optimization pass that turns chains of integer
Add missing header.

This reverts commit 86dd6335cf7607af22f383a9a8e072ba929848cf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312322 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 10:56:34 +00:00
Oliver Stannard
132e2d3b5c [ARM] Add 2-operand assembly aliases for Thumb1 ADD/SUB
This adds 2-operand assembly aliases for these instructions:
  add r0, r1    =>   add r0, r0, r1
  sub r0, r1    =>   sub r0, r0, r1

Previously this syntax was only accepted for Thumb2 targets, where the
wide versions of the instructions were used.

This patch allows the 2-operand syntax to be used for Thumb1 targets,
and selects the narrow encoding when it is used for Thumb2 targets.

Differential revision: https://reviews.llvm.org/D37377



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312321 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 10:47:25 +00:00
Diana Picus
a7633b580e Move static helper into ARMTargetLowering. NFC
This exposes the isReadOnly(GlobalValue *) in the ARMTargetLowering so
we can make use of it in GlobalISel as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312320 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 10:44:48 +00:00
Diana Picus
db15069f47 [ARM] GlobalISel: More tests. NFC.
Test constants as well in the PIC tests. These are also represented as
G_GLOBAL_VALUE, and although they are treated just like other globals
for PIC, they won't be for ROPI, so it's good to have this coverage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312319 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 10:18:37 +00:00
Strahinja Petrovic
707fb1cf0c Debug info for variables whose type is shrinked to bool
This patch provides such debug information for integer
variables whose type is shrinked to bool by providing 
dwarf expression which returns either constant initial 
value or other value.

Patch by Nikola Prica.

Differential Revision: https://reviews.llvm.org/D35994


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312318 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 10:05:27 +00:00
Clement Courbet
1a4fd5c74c Revert "[MergeICmps] MergeICmps is a new optimization pass that turns chains of integer"
Break build

This reverts commit d07ab866f7f88f81e49046d691a80dcd32d7198b.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312317 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 09:43:08 +00:00
Clement Courbet
930b028c65 [MergeICmps] MergeICmps is a new optimization pass that turns chains of integer
comparisons into memcmp.

Thanks to recent improvements in the LLVM codegen, the memcmp is typically
inlined as a chain of efficient hardware comparisons.
This typically benefits C++ member or nonmember operator==().

For now this is disabled by default until:
 - https://bugs.llvm.org/show_bug.cgi?id=33329 is complete
 - Benchmarks show that this is always useful.

Differential Revision:
https://reviews.llvm.org/D33987

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312315 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 09:07:05 +00:00
Craig Topper
8481f03def [AVX512] Suppress duplicate register only FMA patterns.
Previously we generated a register only pattern for each of the 3 instruction forms, but they are all identical as far as isel is concerned. So drop the others and just keep the 213 version.

This removes 2968 bytes from the isel table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312313 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 07:58:16 +00:00
Craig Topper
bd19fad99b [X86] Remove unused multiclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312312 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 07:58:15 +00:00
Craig Topper
86af00af8a [X86] Simplify some multiclasses by inheriting from similar ones. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312311 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 07:58:14 +00:00
Craig Topper
4650545edb [X86] Add a couple TODOs to the PMADD52 instrucions about missing commuting opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312310 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 07:58:13 +00:00
Craig Topper
10f7b4fa41 [X86] Add isel patterns for memory forms of FMA3 intrinsic instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312309 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 07:58:13 +00:00
Craig Topper
c945ee63fe [X86] Remove unnecessary COPY_TO_REGCLASS(VR128) from the output patterns for FMA instrinsics.
The instructions are already defined as writing a VR128 register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312308 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 07:58:11 +00:00
Vitaly Buka
fe70e7d53a Fix check-llvm on kernel 4.9+ with asan or msan
Summary:
Before https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.9.46&id=84638335900f1995495838fe1bd4870c43ec1f67
test worked because memory allocated with mmap was not counted against RLIMIT_DATA.

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D37366

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312303 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 01:47:34 +00:00
Leo Li
59cb965ee9 [CMake] Add more runtime configurations.
Summary:
- `project` is required when `runtime/CMakeList.txt` is the top-level `CMakeList.txt` file. This will establish version and policy settings.

- `-D_FILE_OFFSET_BITS=64` should never be set for Android runtimes.

Reviewers: srhines, pirama, beanz

Subscribers: llvm-commits, srhines, mgorny

Differential Revision: https://reviews.llvm.org/D35648

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312302 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 01:05:59 +00:00
Matt Arsenault
fcd77e8a04 AMDGPU: Fold clamp modifier for packed instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312297 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 23:53:50 +00:00
Sam Clegg
3ccf5513f6 [WebAssembly] Fix getSymbolValue() for data symbols
This is mostly a fix for the output of `llvm-nm`

See Bug 34392: https://bugs.llvm.org//show_bug.cgi?id=34392

Differential Revision: https://reviews.llvm.org/D37359

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312294 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 23:22:44 +00:00
Eugene Zelenko
3df2f4a7e2 [IR] Missing changes for r312289 (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312290 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 22:06:09 +00:00
Eugene Zelenko
046ca04445 [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes. Also affected in files (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312289 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:56:16 +00:00
Reid Kleckner
bf95626bdc [lit] Fix some issues with short paths in test discovery introduced in r312254
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312288 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:56:14 +00:00
Derek Schuff
1bfa7682dc [WebAssembly] Refactor load ISel tablegen patterns into classes
Not all of these will be able to be used by atomics because tablegen, but it
still seems like a good change by itself.

Differential Revision: https://reviews.llvm.org/D37345

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312287 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:51:48 +00:00
Sam Clegg
209d3c2d39 [WebAssembly] Validate exports when parsing object files
Subscribers: jfb, dschuff, jgravelle-google, aheejin

Differential Revision: https://reviews.llvm.org/D37358

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312286 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:43:45 +00:00
Craig Topper
02e6b04352 [X86] Don't pull carry through X86ISD::ADD carryin, -1 if we can't guranteed we're really using the carry flag from the add.
Prior to this patch we had a DAG combine that tried to bypass an X86ISD::ADD with -1 being added to the carry flag of some previous operation. We would then pass the carry flag directly to user.

But this is only safe if the user is looking for the carry flag and not the zero flag.

So we need to only do this combine in a context where we know what flag the consumer is using.

Fixes PR34381.

Differential Revision: https://reviews.llvm.org/D37317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312285 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:39:23 +00:00
Sam Clegg
bbbfad97fc [llvm-nm] Fix output formatting of -f sysv for 64bit targets
Differential Revision: https://reviews.llvm.org/D37347

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312284 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:23:44 +00:00
Matt Arsenault
d213820974 AMDGPU: Turn int pack pattern into build_vector
build_vector is a more useful canonical form when
pattern matching packed operations, so turn shift
into high element into a build_vector.

Should show no change for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312282 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:17:22 +00:00
Jessica Paquette
2439f12f31 [MachineOutliner] Recommit r312194, missed optimization remarks
Before, this commit caused a buildbot failure:

http://bb.pgr.jp/builders/test-llvm-i686-linux-RA/builds/6026/steps/test_llvm/logs/LLVM%20%3A%3A%20CodeGen__AArch64__machine-outliner-remarks.ll

This was caused by the Key value in DiagnosticInfoOptimizationBase being
deallocated before emitting the remarks defined in MachineOutliner.cpp. As of
r312277 this should no longer be an issue.
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312280 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 21:02:45 +00:00
Sanjay Patel
ae1871f4dd [x86] add more tests for horizontal ops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312279 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 20:59:25 +00:00
Zachary Turner
71f3f90b04 Fix some size_t / uint32_t mismatched comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 20:50:25 +00:00
Jessica Paquette
70b69dcc75 [NFC] Change Key in Argument to a std::string
Before, Key was a StringRef to avoid unnecessary copies. This commit changes
that to a std::string.

This was okay previously because when people called emit for remarks before,
they would create the remark *within* the call to emit. However, if you build
the remark up and call emit *afterward*, it's possible to end up freeing the
memory assigned to the StringRef before the call to emit.

This caused a test failure with https://reviews.llvm.org/D37085 on Linux.
Since building remarks before a call to emit is a valid use-case, it makes
sense to replace this with a std::string.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312277 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 20:47:37 +00:00
Zachary Turner
ae734ae0ea [llvm-pdbutil] Print detailed S_UDT stats.
This adds a new command line option, -udt-stats, which breaks
down the stats of S_UDT records.  These are one of the biggest
contributors to the size of /DEBUG:FASTLINK PDBs, so they need
some additional tools to be able to analyze their usage.  This
option will dig into each S_UDT record and determine what kind
of record it points to, and then break down the statistics by
the target type.  The goal here is to identify how our object
files differ from MSVC object files in S_UDT records, so that
we can output fewer of them and reach size parity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312276 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 20:43:22 +00:00