Skip to content
  1. Jun 17, 2017
  2. Jun 16, 2017
    • Benjamin Kramer's avatar
      [Object] Remove redundant std::move. · 74b4ded0
      Benjamin Kramer authored
      Found by -Wpessimizing-move.
      
      llvm-svn: 305595
      74b4ded0
    • Eric Beckmann's avatar
      Switch external cvtres.exe for llvm's own resource library. · d135e8c0
      Eric Beckmann authored
      In this patch, I flip the switch in DriverUtils from using the external
      cvtres.exe tool to using the Windows Resource library in llvm.
      
      I also fixed a bug where .rsrc sections were marked as discardable
      memory and therefore were placed in the wrong order in the final PE.
      
      Furthermore, I modified WindowsResource to write the coff directly to a
      memory buffer instead of to file, also had it use the machine types
      already declared in COFF.h instead creating my own enum.
      
      Finally, I flipped the switch to allow all unit tests that had
      previously run only on windows due to a winres dependency to run
      cross-platform.
      
      Reviewers: zturner, ruiu
      
      Subscribers: llvm-commits, hiraditya
      
      Differential Revision: https://reviews.llvm.org/D34265
      
      llvm-svn: 305592
      d135e8c0
    • Anna Thomas's avatar
      [InstCombine] Set correct insertion point for selects generated while folding phis · 6bc14c65
      Anna Thomas authored
      Summary:
      When we fold vector constants that are operands of phi's that feed into select,
      we need to set the correct insertion point for the *new* selects that get generated.
      The correct insertion point is the incoming block for the phi.
      Such cases can occur with patch r298845, which fixed folding of
      vector constants, but the new selects could be inserted incorrectly (as the added
      test case shows).
      
      Reviewers: majnemer, spatel, sanjoy
      
      Reviewed by: spatel
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D34162
      
      llvm-svn: 305591
      6bc14c65
    • Evgeniy Stepanov's avatar
      Change YAML traits for vector<string> to flow_vector. · 69e2b1d4
      Evgeniy Stepanov authored
      This is a workaround for an ODR conflict with the definition in
      AMDGPUCodeObjectMetadata.cpp.
      
      llvm-svn: 305584
      69e2b1d4
    • Davide Italiano's avatar
      [SCCP] Simplify the code a bit. NFCI. · ec5b0257
      Davide Italiano authored
      llvm-svn: 305583
      ec5b0257
    • Davide Italiano's avatar
      [SCCP] Clarify a comment about unhandled instructions. · 0b1190aa
      Davide Italiano authored
      llvm-svn: 305579
      0b1190aa
    • Wei Mi's avatar
      [GVN] Recommit the patch "Add phi-translate support in scalarpre". · a2493b6a
      Wei Mi authored
      The recommit fixes two bugs: The first one is to use CurrentBlock instead of
      PREInstr's Parent as param of performScalarPREInsertion because the Parent
      of a clone instruction may be uninitialized. The second one is stop PRE when
      CurrentBlock to its predecessor is a backedge and an operand of CurInst is
      defined inside of CurrentBlock. The same value defined inside of loop in last
      iteration can not be regarded as available.
      
      Right now scalarpre doesn't have phi-translate support, so it will miss some
      simple pre opportunities. Like the following testcase, current scalarpre cannot
      recognize the last "a * b" is fully redundent because a and b used by the last
      "a * b" expr are both defined by phis.
      
      long a[100], b[100], g1, g2, g3;
      __attribute__((pure)) long goo();
      
      void foo(long a, long b, long c, long d) {
      
        g1 = a * b;
        if (__builtin_expect(g2 > 3, 0)) {
          a = c;
          b = d;
          g2 = a * b;
        }
        g3 = a * b;      // fully redundant.
      
      }
      The patch adds phi-translate support in scalarpre. This is only a temporary
      solution before the newpre based on newgvn is available.
      
      Differential Revision: https://reviews.llvm.org/D32252
      
      llvm-svn: 305578
      a2493b6a
    • Davide Italiano's avatar
      [SCCP] Remove redundant instruction visitors. · d95d871a
      Davide Italiano authored
      Whenever we don't know what to do with an instruction, we send
      it to overdefined anyway.
      
      llvm-svn: 305575
      d95d871a
    • Spyridoula Gravani's avatar
    • Matthias Braun's avatar
      Revert "RegScavenging: Add scavengeRegisterBackwards()" · 35530d71
      Matthias Braun authored
      Revert because of reports of some PPC input starting to spill when it
      was predicted that it wouldn't and no spillslot was reserved.
      
      This reverts commit r305516.
      
      llvm-svn: 305566
      35530d71
    • Xinliang David Li's avatar
      Fix function name /NFC · c3f8e832
      Xinliang David Li authored
      llvm-svn: 305564
      c3f8e832
    • Craig Topper's avatar
      [InstCombine] Add test cases to show missed opportunities due to overly... · 31399b70
      Craig Topper authored
      [InstCombine] Add test cases to show missed opportunities due to overly conservative single use checks. NFC
      
      llvm-svn: 305562
      31399b70
    • Yonghong Song's avatar
      bpf: avoid load from read-only sections · ac2e2502
      Yonghong Song authored
      
      
      If users tried to have a structure decl/init code like below
         struct test_t t = { .memeber1 = 45 };
      It is very likely that compiler will generate a readonly section
      to hold up the init values for variable t. Later load of t members,
      e.g., t.member1 will result in a read from readonly section.
      
      BPF program cannot handle relocation. This will force users to
      write:
        struct test_t t = {};
        t.member1 = 45;
      This is just inconvenient and unintuitive.
      
      This patch addresses this issue by implementing BPF PreprocessISelDAG.
      For any load from a global constant structure or an global array of
      constant struct, it attempts to
      translate it into a constant directly. The traversal of the
      constant struct and other constant data structures are similar
      to where the assembler emits read-only sections.
      
      Four different unit test cases are also added to cover
      different scenarios.
      
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      llvm-svn: 305560
      ac2e2502
    • Yonghong Song's avatar
      bpf: set missing types in insn tablegen file · 5c654396
      Yonghong Song authored
      
      
      o This is discovered during my study of 32-bit subregister
        support.
      o This is no impact on current functionality since we
        only support 64-bit registers.
      o Searching the web, looks like the issue has been discovered
        before, so fix it now.
      
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      llvm-svn: 305559
      5c654396
Loading