Skip to content
  1. Nov 09, 2016
    • Greg Clayton's avatar
      Added the ability to dump hex bytes easily into a raw_ostream. · bde0a163
      Greg Clayton authored
      Unit tests were added to verify this functionality keeps working correctly.
      
      Example output for raw hex bytes:
      llvm::ArrayRef<uint8_t> Bytes = ...;
      llvm::outs() << format_hex_bytes(Bytes);
      554889e5 4881ec70 04000048 8d051002
      00004c8d 05fd0100 004c8b0d d0020000
      
      Example output for raw hex bytes with offsets:
      llvm::outs() << format_hex_bytes(Bytes, 0x100000d10);
      0x0000000100000d10: 554889e5 4881ec70 04000048 8d051002
      0x0000000100000d20: 00004c8d 05fd0100 004c8b0d d0020000
      
      Example output for raw hex bytes with ASCII with offsets:
      llvm::outs() << format_hex_bytes_with_ascii(Bytes, 0x100000d10);
      0x0000000100000d10: 554889e5 4881ec70 04000048 8d051002 |UH.?H.?p...H....|
      0x0000000100000d20: 00004c8d 05fd0100 004c8b0d d0020000 |..L..?...L..?...|
      
      The default groups bytes into 4 byte groups, but this can be changed to 1 byte:
      llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 16 /*NumPerLine*/, 1 /*ByteGroupSize*/);
      0x0000000100000d10: 55 48 89 e5 48 81 ec 70 04 00 00 48 8d 05 10 02
      0x0000000100000d20: 00 00 4c 8d 05 fd 01 00 00 4c 8b 0d d0 02 00 00
      
      llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 16 /*NumPerLine*/, 2 /*ByteGroupSize*/);
      0x0000000100000d10: 5548 89e5 4881 ec70 0400 0048 8d05 1002
      0x0000000100000d20: 0000 4c8d 05fd 0100 004c 8b0d d002 0000
      
      llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 8 /*NumPerLine*/, 1 /*ByteGroupSize*/);
      0x0000000100000d10: 55 48 89 e5 48 81 ec 70
      0x0000000100000d18: 04 00 00 48 8d 05 10 02
      0x0000000100000d20: 00 00 4c 8d 05 fd 01 00
      0x0000000100000d28: 00 4c 8b 0d d0 02 00 00
      
      https://reviews.llvm.org/D26405
      
      llvm-svn: 286316
      bde0a163
    • Sanjay Patel's avatar
      [InstCombine] fix profitability equation for max-of-nots transform · 4e9d6cd3
      Sanjay Patel authored
      As the test change shows, we can increase the critical path by adding
      a 'not' instruction, so make sure that we're actually removing an
      instruction if we do this transform.
      
      This transform could also cause us to miss folds of min/max pairs.
      
      llvm-svn: 286315
      4e9d6cd3
    • Sanjay Patel's avatar
      [InstCombine] reduce indentation; NFC · 99dc5fef
      Sanjay Patel authored
      llvm-svn: 286314
      99dc5fef
    • Justin Lebar's avatar
      [CUDA] Use only the GVALinkage on function definitions. · 2d56c265
      Justin Lebar authored
      Summary:
      Previously we'd look at the GVALinkage of whatever FunctionDecl you
      happened to be calling.
      
      This is not right.  In the absence of the gnu_inline attribute, to be
      handled separately, the function definition determines the function's
      linkage.  So we need to wait until we get a def before we can know
      whether something is known-emitted.
      
      Reviewers: tra
      
      Subscribers: cfe-commits, rsmith
      
      Differential Revision: https://reviews.llvm.org/D26268
      
      llvm-svn: 286313
      2d56c265
    • Jim Ingham's avatar
      4f243e8d
    • Petr Hosek's avatar
      [CMake] Get libunwind building under LLVM/runtimes · 92e71965
      Petr Hosek authored
      The new LLVM runtimes directory requires the same conventions to be
      followed across the runtime projects. These changes make libunwind
      build under the runtimes subdirectory.
      
      This patch contains the following changes:
      
      * Rename LLVM_CONFIG to LLVM_CONFIG_PATH
      * Check if compiler supports C++11 (required by libunwind)
      
      Differential Revision: https://reviews.llvm.org/D26360
      
      llvm-svn: 286308
      92e71965
  2. Nov 08, 2016
Loading