1. May 14, 2016
    • Jun Bum Lim's avatar
      Rename getLargestLegalIntTypeSize to getLargestLegalIntTypeSizeInBits(). NFC. · be11bdc4
      Jun Bum Lim authored
      Summary: Rename DataLayout::getLargestLegalIntTypeSize to DataLayout::getLargestLegalIntTypeSizeInBits() to prevent similar mistakes  fixed in r269433.
      
      Reviewers: joker.eph, mcrosier
      
      Subscribers: mcrosier, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D20248
      
      llvm-svn: 269456
      be11bdc4
    • Zachary Turner's avatar
      Clean up test results on Windows. · 4fd6a960
      Zachary Turner authored
      Remove XFAIL from some tests that now pass.
      Add XFAIL to some tests that now fail.
      Fix a crasher where a null pointer check isn't guarded.
      Properly handle all types of errors in SymbolFilePDB.
      
      llvm-svn: 269454
      4fd6a960
    • Xinliang David Li's avatar
      [profile] Eliminate dynamic memory allocation for buffered writer · 609fae38
      Xinliang David Li authored
      With this change, dynamic memory allocation is only used
      for testing purpose. This change is one of the many steps to
      make instrument profiler dynamic allocation free.
      
      llvm-svn: 269453
      609fae38
    • Konstantin Zhuravlyov's avatar
      [AMDGPU] Update nop insertion for debugger usage · e3d322af
      Konstantin Zhuravlyov authored
      - Insert one nop for each high level statement instead of two
      - Do not insert nop before prologue
      
      Differential Revision: http://reviews.llvm.org/D20215
      
      llvm-svn: 269452
      e3d322af
    • Renato Golin's avatar
      Revert "[ARM,AArch64] NFC. Add extra test cases for bswap lowering." · 1d1b82cb
      Renato Golin authored
      This reverts commit r269425, as it fails on Windows (Thumb only).
      
      llvm-svn: 269451
      1d1b82cb
    • Kostya Serebryany's avatar
      [libFuzzer] print the file name before executing the input so that if there is... · 62895369
      Kostya Serebryany authored
      [libFuzzer] print the file name before executing the input so that if there is a crash we know which files has caused it
      
      llvm-svn: 269450
      62895369
    • Sanjay Patel's avatar
      regenerate checks and add a run to show missed shrinkage · 23fa0907
      Sanjay Patel authored
      llvm-svn: 269449
      23fa0907
    • Kostya Serebryany's avatar
      [libFuzzer] simplify FuzzerInterface.h · 8b0d90a6
      Kostya Serebryany authored
      llvm-svn: 269448
      8b0d90a6
    • Sanjay Patel's avatar
      regenerate checks · 4e0cf493
      Sanjay Patel authored
      llvm-svn: 269447
      4e0cf493
    • Paul Osmialowski's avatar
      add support for -print-imm-hex for AArch64 · 4f5b3be7
      Paul Osmialowski authored
      
      
      Most immediates are printed in Aarch64InstPrinter using 'formatImm' macro,
      but not all of them.
      
      Implementation contains following rules:
      
      - floating point immediates are always printed as decimal
      - signed integer immediates are printed depends on flag settings
        (for negative values 'formatImm' macro prints the value as i.e -0x01
        which may be convenient when imm is an address or offset)
      - logical immediates are always printed as hex
      - the 64-bit immediate for advSIMD, encoded in "a:b:c:d:e:f:g:h" is always printed as hex
      - the 64-bit immedaite in exception generation instructions like:
        brk, dcps1, dcps2, dcps3, hlt, hvc, smc, svc is always printed as hex
      - the rest of immediates is printed depends on availability
        of -print-imm-hex
      
      Signed-off-by: default avatarMaciej Gabka <maciej.gabka@arm.com>
      Signed-off-by: default avatarPaul Osmialowski <pawel.osmialowski@arm.com>
      
      Differential Revision: http://reviews.llvm.org/D16929
      
      llvm-svn: 269446
      4f5b3be7
    • Geoff Berry's avatar
      [EarlyCSE] Change key type of AvailableCalls to Instruction*. NFCI. · 2f64c202
      Geoff Berry authored
      llvm-svn: 269445
      2f64c202
    • Reid Kleckner's avatar
      [codeview] Dump the type index on the first line of each record · bab3fab8
      Reid Kleckner authored
      This will make it easier to write FileCheck tests.
      
      llvm-svn: 269444
      bab3fab8
    • Paul Osmialowski's avatar
      NFC fix indent (relates to my previous commit) · 97ae10c6
      Paul Osmialowski authored
      llvm-svn: 269443
      97ae10c6
    • Chris Bieneman's avatar
      [obj2yaml] [yaml2obj] Basic support for MachO::load_command · 8b5906ea
      Chris Bieneman authored
      This patch adds basic support for MachO::load_command. Load command types and sizes are encoded in the YAML and expanded back into MachO.
      
      The YAML doesn't yet support load command structs, that is coming next. In the meantime as a temporary measure when writing MachO files the load commands are padded with zeros so that the generated binary is valid.
      
      llvm-svn: 269442
      8b5906ea
    • Etienne Bergeron's avatar
      [include-fixer] Fix broken dependency shared build · 8db51743
      Etienne Bergeron authored
      Summary:
      The shared build is broken (again).
      
      To repro: [Release + Shared]
      ```
      -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
      ```
      
      Errors:
      ```
      tools/clang/tools/extra/include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o: In function `(anonymous namespace)::includeFixerMain(int, char const**)':
      ClangIncludeFixer.cpp:(.text._ZN12_GLOBAL__N_116includeFixerMainEiPPKc+0xbe9): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
      collect2: error: ld returned 1 exit status
      ```
      
      ```
      tools/clang/tools/extra/unittests/include-fixer/CMakeFiles/IncludeFixerTests.dir/IncludeFixerTest.cpp.o: In function `clang::include_fixer::(anonymous namespace)::runIncludeFixer(llvm::StringRef, std::vector<std::string, std::allocator<std::string> > const&)':
      IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x10e): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
      IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x1dc): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
      IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x2f3): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
      IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x40e): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
      IncludeFixerTest.cpp:(.text._ZN5clang13include_fixer12_GLOBAL__N_1L15runIncludeFixerEN4llvm9StringRefERKSt6vectorISsSaISsEE+0x526): undefined reference to `clang::find_all_symbols::SymbolInfo::SymbolInfo(llvm::StringRef, clang::find_all_symbols::SymbolInfo::SymbolKind, llvm::StringRef, int, std::vector<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string>, std::allocator<std::pair<clang::find_all_symbols::SymbolInfo::ContextType, std::string> > > const&)'
      ```
      
      Reviewers: bkramer, hokein
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D20245
      
      llvm-svn: 269441
      8db51743
    • Richard Smith's avatar
      Fix module map typo in r269347. · 4e67cf9a
      Richard Smith authored
      llvm-svn: 269440
      4e67cf9a
    • Sanjay Patel's avatar
      0c8f3f93
    • Richard Smith's avatar
      Update module map for r269380. · 27dba61f
      Richard Smith authored
      llvm-svn: 269438
      27dba61f
    • Rong Xu's avatar
      [PGO] Add flags to control IRPGO warnings. · 0698de92
      Rong Xu authored
      Currently there is no reasonable way to control the warnings in the 'use' phase
      of the IRPGO pass. This is problematic because the output can be somewhat
      spammy. This patch adds some flags which allow us to optionally disable these
      warnings. The current upstream behavior will remain the default.
      
      Patch by Jake VanAdrighem (jvanadrighem@gmail.com)
      
      Differential Revision: http://reviews.llvm.org/D20195
      
      llvm-svn: 269437
      0698de92
    • Bryan Chan's avatar
      [RuntimeDyld] Support R_390_PC64 relocation type · d1145ad2
      Bryan Chan authored
      Summary: When the MCJIT generates ELF code, some DWARF data requires 64-bit PC-relative relocation (R_390_PC64). This patch adds support for R_390_PC64 relocation to RuntimeDyld::resolveSystemZRelocation, to avoid an assertion failure.
      
      Reviewers: uweigand
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D20033
      
      llvm-svn: 269436
      d1145ad2
    • Yaxun Liu's avatar
      Revert "[OpenCL] Add supported OpenCL extensions to target info." · fa1df45c
      Yaxun Liu authored
      Revert r269431 due to build failure caused by warning msg:
      
        llvm/tools/clang/lib/Basic/Targets.cpp:2090:9: error: 'setSupportedOpenCLOpts' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
         void setSupportedOpenCLOpts() {
      
      llvm-svn: 269435
      fa1df45c
    • Ed Maste's avatar
      Disable HostThread::Cancel assertion on FreeBSD · 718e2968
      Ed Maste authored
      It is still used by ProcessMonitor::StopMonitoringChildProcess and
      ProcessMonitor::StopOpThread.
      
      llvm-svn: 269434
      718e2968
    • Jun Bum Lim's avatar
      [MemCpyOpt] Use MaxIntSize in byte instead of bit · f28beac4
      Jun Bum Lim authored
      Summary: This change fix the bug in isProfitableToUseMemset() where MaxIntSize shoule be in byte, not bit.
      
      Reviewers: arsenm, joker.eph, mcrosier
      
      Subscribers: mcrosier, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D20176
      
      llvm-svn: 269433
      f28beac4
    • Renato Golin's avatar
      Revert "[llc] New diagnostic handler" · e9fa3585
      Renato Golin authored
      This reverts commit r269428, as it breaks the LLDB build. We need to
      understand how to change LLDB in the same way as LLC before landing this
      again.
      
      llvm-svn: 269432
      e9fa3585
  2. May 13, 2016
    • Yaxun Liu's avatar
      [OpenCL] Add supported OpenCL extensions to target info. · 64936ce9
      Yaxun Liu authored
      Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line.
      
      Differential Revision: http://reviews.llvm.org/D19484
      
      llvm-svn: 269431
      64936ce9
    • Haojian Wu's avatar
      [include-fixer] Use scope contexts information to improve query. · 57cdcb07
      Haojian Wu authored
      Reviewers: bkramer
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D20205
      
      llvm-svn: 269430
      57cdcb07
    • Etienne Bergeron's avatar
      [clang-rename] Fix broken dependency on shared build. · a4bc53af
      Etienne Bergeron authored
      Summary:
      The build is broken due to a missing dependency.
      
      To repro: [Release + Shared]
      ```
      -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
      ```
      
      Which produce this error:
      ```
      tools/clang/tools/extra/clang-rename/CMakeFiles/clangRename.dir/USRLocFinder.cpp.o: In function `clang::RecursiveASTVisitor<clang::rename::(anonymous namespace)::USRLocFindingASTVisitor>::TraverseCXXConstructorDecl(clang::CXXConstructorDecl*)':
      USRLocFinder.cpp:(.text._ZN5clang19RecursiveASTVisitorINS_6rename12_GLOBAL__N_123USRLocFindingASTVisitorEE26TraverseCXXConstructorDeclEPNS_18CXXConstructorDeclE+0x170): undefined reference to `clang::Lexer::getSourceText(clang::CharSourceRange, clang::SourceManager const&, clang::LangOptions const&, bool*)'
      ```
      
      Reviewers: alexfh, yaron.keren
      
      Subscribers: yaron.keren, cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D20240
      
      llvm-svn: 269429
      a4bc53af
    • Renato Golin's avatar
      [llc] New diagnostic handler · d7a64a5b
      Renato Golin authored
      Without a diagnostic handler installed, llc's behaviour is to exit on the first
      error that it encounters. This is very different from the behaviour of clang
      and other front ends, which try to gather as many errors as possible before
      exiting.
      
      This commit adds a diagnostic handler to llc, allowing it to find and report
      more than one error. The old behaviour is preserved under a flag (-exit-on-error).
      
      Some of the tests fail with the new diagnostic handler, so they have to use the
      new flag in order to run under the previous behaviour. Some of these are known
      bugs, others need further investigation. Ideally, we should fix the tests and
      remove the flag at some point in the future.
      
      Patch by Diana Picus.
      
      llvm-svn: 269428
      d7a64a5b
    • Haojian Wu's avatar
      [include-fixer] Simplify unittest code. · 631e5f23
      Haojian Wu authored
      Summary:
      The InMemorySymbolIndex only constructs hard-coded Class symbols from a string
      map. The patch provide a flexable way in InMemorySymbolIndex to create a custom
      SymbolInfo in the include-fixer unittest.
      
      Reviewers: bkramer
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D20232
      
      llvm-svn: 269427
      631e5f23
    • Sanjay Patel's avatar
      [InstCombine] canonicalize* LE/GE vector integer comparisons to LT/GT (PR26701, PR26819) · b79ab278
      Sanjay Patel authored
      *We don't currently handle the  edge case constants (min/max values), so it's not a complete
      canonicalization.
      
      To fully solve the motivating bugs, we need to enhance this to recognize a zero vector
      too because that's a ConstantAggregateZero which is a ConstantData, not a ConstantVector
      or a ConstantDataVector.
      
      Differential Revision: http://reviews.llvm.org/D17859 
      
      llvm-svn: 269426
      b79ab278
    • Renato Golin's avatar
      [ARM,AArch64] NFC. Add extra test cases for bswap lowering. · 8793c521
      Renato Golin authored
      These tests were sitting in Phab for many months. They're good tests and should be in.
      
      Patch by Charlie Turner.
      
      llvm-svn: 269425
      8793c521
    • Silviu Baranga's avatar
      [scan-build] fix warnings emiited on LLVM Analysis code base · 24dbd2e7
      Silviu Baranga authored
      Fix "Logic error" warnings of the type "Called C++ object pointer is
      null" reported by Clang Static Analyzer on the following files:
      
      lib/Analysis/ScalarEvolution.cpp,
      lib/Analysis/LoopInfo.cpp.
      
      Patch by Apelete Seketeli!
      
      llvm-svn: 269424
      24dbd2e7
    • Yaron Keren's avatar
      Prune four superfluous ExternalSemaSource.h includes and one forward declaration in Sema.h · 5c716175
      Yaron Keren authored
      where ExternalSemaSource.h was already included due to ExternalSemaSource:: member uses.
      
      llvm-svn: 269423
      5c716175
    • Haojian Wu's avatar
      [find-all-symbols] Add EnumDecl type in YAML traits. · db98f1d9
      Haojian Wu authored
      llvm-svn: 269422
      db98f1d9
    • Ed Maste's avatar
      Remove unused variable · d589a755
      Ed Maste authored
      llvm-svn: 269421
      d589a755
    • Simon Pilgrim's avatar
      [X86][AVX512] Moved CHECKs inside functions to stop update_llc_test_checks going haywire · 217b886b
      Simon Pilgrim authored
      I'm not going to regenerate these anytime soon but do have some diffs to apply that I'd like to do with update_llc_test_checks
      
      llvm-svn: 269420
      217b886b
    • Oleg Ranevskyy's avatar
      [CodeGen] Clang does not choose aapcs-vfp calling convention for ARM bare... · 7232f660
      Oleg Ranevskyy authored
      [CodeGen] Clang does not choose aapcs-vfp calling convention for ARM bare metal target with hard float (EABIHF)
      
      Summary:
      Clang does not detect `aapcs-vfp` for the EABIHF environment. The reason is that only GNUEABIHF is considered while choosing calling convention, EABIHF is ignored.
      
      This causes clang to use `aapcs` for EABIHF and add the `arm_aapcscc` specifier to functions in generated IR.
      
      The modified `arm-cc.c` test checks that no calling convention specifier is added to functions for EABIHF, which means the default one is used (`CallingConv::ARM_AAPCS_VFP`).
      
      Reviewers: rengolin, compnerd, t.p.northover
      
      Subscribers: aemerson, rengolin, asl, cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D20219
      
      llvm-svn: 269419
      7232f660
    • Etienne Bergeron's avatar
      [AST] Add missing const qualifiers to AstContext in Type.cpp · d51d9ecd
      Etienne Bergeron authored
      Summary:
      Add some missing const qualifiers to AstContext.
      The ASTContext can't be modified with accessors.
      
      There is no behavior change. This patch is cleanup only.
      
      Reviewers: rsmith
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D20226
      
      llvm-svn: 269418
      d51d9ecd
    • Rafael Espindola's avatar
      When using Rela, don't write the addend to the output section. · 72294967
      Rafael Espindola authored
      The Elf_Rela has an explicit addend. It doesn't need the addend to be
      written to the section being relocated.
      
      Since relative relocations are very common in the output, this is a
      noticeable speedup. The results I got were
      
      chromium
        master 4.778149487
        patch  4.761120792 0.996436131802
      chromium fast
        master 1.896253636
        patch  1.840990582 0.970856718241
      the gold plugin
        master 0.399337811
        patch  0.392279276 0.982324401032
      clang
        master 0.666873675
        patch  0.665895708 0.998533504865
      llvm-as
        master 0.037101095
        patch  0.037123149 1.00059442989
      the gold plugin fsds
        master 0.422473396
        patch  0.414192879 0.980399909016
      clang fsds
        master 0.747302008
        patch  0.744843964 0.996710775599
      llvm-as fsds
        master 0.033146245
        patch  0.033064531 0.997534743377
      scylla
        master 4.08857525
        patch  4.082245184 0.998451767275
      
      llvm-svn: 269417
      72294967
    • Pavel Labath's avatar
      Remove ASTContexts from SystemInitializerCommon · 04b979ff
      Pavel Labath authored
      Summary:
      The AST contexts are not needed in the server components, and the clang context in particular
      pulls in large parts of clang into the binary. Simply removing these two calls reduces the
      lldb-server size by about 50%--80%, depending on the architecture and build type.
      
      This should not impact the client parts as the same calls are already present in
      SystemInitializerFull.
      
      Reviewers: tberghammer, clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D20236
      
      llvm-svn: 269416
      04b979ff