From bob.wilson at apple.com Mon Nov 28 01:59:53 2011
From: bob.wilson at apple.com (Bob Wilson)
Date: Mon, 28 Nov 2011 07:59:53 -0000
Subject: [llvm-commits] [llvm] r145234 - in /llvm/trunk: Makefile.config.in
Makefile.rules autoconf/configure.ac configure
Message-ID: <20111128075953.257E12A6C12D@llvm.org>
Author: bwilson
Date: Mon Nov 28 01:59:52 2011
New Revision: 145234
URL: http://llvm.org/viewvc/llvm-project?rev=145234&view=rev
Log:
Add an optional separate install prefix for internal components. rdar://10217046
Some files installed by clang are not relevant for general users and we'd like
to be able to install them to a different location. This adds a new
--with-internal-prefix configure option and a corresponding PROJ_internal_prefix
makefile variable, which defaults to the standard prefix. A tool makefile
can specify that it should be installed to this internal prefix by defining
INTERNAL_TOOL.
Modified:
llvm/trunk/Makefile.config.in
llvm/trunk/Makefile.rules
llvm/trunk/autoconf/configure.ac
llvm/trunk/configure
Modified: llvm/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=145234&r1=145233&r2=145234&view=diff
==============================================================================
--- llvm/trunk/Makefile.config.in (original)
+++ llvm/trunk/Makefile.config.in Mon Nov 28 01:59:52 2011
@@ -86,6 +86,13 @@
endif
endif
+INTERNAL_PREFIX := @INTERNAL_PREFIX@
+ifneq ($(INTERNAL_PREFIX),)
+PROJ_internal_prefix := $(INTERNAL_PREFIX)
+else
+PROJ_internal_prefix := $(prefix)
+endif
+
PROJ_bindir := $(PROJ_prefix)/bin
PROJ_libdir := $(PROJ_prefix)/lib
PROJ_datadir := $(PROJ_prefix)/share
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=145234&r1=145233&r2=145234&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Mon Nov 28 01:59:52 2011
@@ -1503,12 +1503,19 @@
uninstall-local::
$(Echo) Uninstall circumvented with NO_INSTALL
else
-DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLEXENAME)
+
+ifdef INTERNAL_TOOL
+ToolBinDir = $(DESTDIR)$(PROJ_internal_prefix)/bin
+else
+ToolBinDir = $(DESTDIR)$(PROJ_bindir)
+endif
+DestTool = $(ToolBinDir)/$(TOOLEXENAME)
install-local:: $(DestTool)
-$(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir)
+$(DestTool): $(ToolBuildPath)
$(Echo) Installing $(BuildMode) $(DestTool)
+ $(Verb) $(MKDIR) $(ToolBinDir)
$(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
uninstall-local::
@@ -1517,7 +1524,7 @@
# TOOLALIAS install.
ifdef TOOLALIAS
-DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT)
+DestToolAlias = $(ToolBinDir)/$(TOOLALIAS)$(EXEEXT)
install-local:: $(DestToolAlias)
@@ -2276,6 +2283,7 @@
$(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
$(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
$(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
+ $(Echo) "PROJ_internal_prefix : " '$(PROJ_internal_prefix)'
$(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
$(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
$(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=145234&r1=145233&r2=145234&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Mon Nov 28 01:59:52 2011
@@ -885,6 +885,12 @@
esac],
llvm_cv_enable_libffi=no)
+AC_ARG_WITH(internal-prefix,
+ AS_HELP_STRING([--with-internal-prefix],
+ [Installation directory for internal files]),,
+ withval="")
+AC_SUBST(INTERNAL_PREFIX,[$withval])
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 4: Check for programs we need and that they are the right version
Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=145234&r1=145233&r2=145234&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Mon Nov 28 01:59:52 2011
@@ -711,6 +711,7 @@
EXTRA_LD_OPTIONS
CLANG_SRC_ROOT
BINUTILS_INCDIR
+INTERNAL_PREFIX
NM
ifGNUmake
LN_S
@@ -1451,6 +1452,7 @@
plugin-api.h file for gold plugin.
--with-bug-report-url Specify the URL where bug reports should be
submitted (default=http://llvm.org/bugs/)
+ --with-internal-prefix Installation directory for internal files
--with-tclinclude directory where tcl headers are
--with-udis86= Basic support exits on the X86 backend. Currently
exits -> exists ?
> +vararg don't work and the object files are not marked the way the gold
don't -> doesn't
> +linker expects, but simple Go program can be built by dragonegg.
Basic support exits on the X86 backend. Currently -vararg don't work and the object files are not marked the way the gold +
Basic support exists on the X86 backend. Currently +vararg doesn't work and the object files are not marked the way the gold linker expects, but simple Go program can be built by dragonegg.
From benny.kra at googlemail.com Mon Nov 28 11:10:26 2011 From: benny.kra at googlemail.com (Benjamin Kramer) Date: Mon, 28 Nov 2011 18:10:26 +0100 Subject: [llvm-commits] [llvm] r145249 - /llvm/trunk/include/llvm/ADT/APInt.h In-Reply-To:Basic support exits on the X86 backend. Currently > -vararg don't work and the object files are not marked the way the gold > +
Basic support exists on the X86 backend. Currently > +vararg doesn't work and the object files are not marked the way the gold > linker expects, but simple Go program can be built by dragonegg.
> > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From stoklund at 2pi.dk Mon Nov 28 12:03:11 2011 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Mon, 28 Nov 2011 18:03:11 -0000 Subject: [llvm-commits] [llvm] r145253 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111128180311.F0E012A6C12D@llvm.org> Author: stoklund Date: Mon Nov 28 12:03:11 2011 New Revision: 145253 URL: http://llvm.org/viewvc/llvm-project?rev=145253&view=rev Log: Explain what ExeDepsFix does. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145253&r1=145252&r2=145253&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 12:03:11 2011 @@ -942,9 +942,12 @@ comparisons, turning them into various optimized code sequences (e.g. using the SSE4/AVX "blend" instructions).getExecutionDomain and
- setExecutionDomain hooks to use it.getExecutionDomain and setExecutionDomain hooks
+ to use the pass.
From bigcheesegs at gmail.com Mon Nov 28 12:20:09 2011
From: bigcheesegs at gmail.com (Michael J. Spencer)
Date: Mon, 28 Nov 2011 18:20:09 -0000
Subject: [llvm-commits] [llvm] r145254 - /llvm/trunk/docs/ReleaseNotes.html
Message-ID: <20111128182009.C278C2A6C12D@llvm.org>
Author: mspencer
Date: Mon Nov 28 12:20:09 2011
New Revision: 145254
URL: http://llvm.org/viewvc/llvm-project?rev=145254&view=rev
Log:
Add object file related release notes.
Modified:
llvm/trunk/docs/ReleaseNotes.html
Modified: llvm/trunk/docs/ReleaseNotes.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145254&r1=145253&r2=145254&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 12:20:09 2011
@@ -62,8 +62,8 @@
releases page.
-
-
+
+
If Clang rejects your code but another compiler accepts it, please take a look at the language compatibility guide to make sure this is not intentional or a known @@ -209,7 +209,7 @@
LLDB is a ground-up implementation of a command line debugger, as well as a debugger API that can be used from other applications. LLDB makes use of the Clang parser to provide high-fidelity expression parsing (particularly for @@ -273,7 +273,7 @@
AddressSanitizer @@ -339,7 +339,7 @@
Clam AntiVirus is an open source (GPL) @@ -407,10 +407,10 @@ typing.
Eero is a fully @@ -426,7 +426,7 @@
FAUST is a compiled language for @@ -441,7 +441,7 @@
GHC is an open source, state-of-the-art programming suite for Haskell, a @@ -507,7 +507,7 @@ example program. ispc is licensed under the BSD license.
Pure is an algebraic/functional programming language based on term rewriting. Programs @@ -610,7 +610,7 @@ languages (including the ability to load LLVM bitcode modules, and inline C, C++, Fortran and Faust code in Pure programs if the corresponding LLVM-enabled compilers are installed).
- +Pure version 0.48 has been tested and is known to work with LLVM 3.0 (and continues to work with older LLVM releases >= 2.5).
@@ -671,7 +671,7 @@ co-design flow from C/C++ programs down to synthesizable VHDL and parallel program binaries. Processor customization points include the register files, function units, supported operations, and the interconnection network. - +TCE uses Clang and LLVM for C/C++ language support, target independent optimizations and also for parts of code generation. It generates new LLVM-based code generators "on the fly" for the designed TTA processors and @@ -679,7 +679,7 @@ per-target recompilation of larger parts of the compiler chain.
LLVM 3.0 includes several major changes and big features:
The PTX back-end is still experimental, but is fairly usable for compute kernels in LLVM 3.0. Most scalar arithmetic is implemented, as well as intrinsics to access the special PTX registers and sync instructions. The major missing pieces are texture/sampler support and some vector operations.
- +That said, the backend is already being used for domain-specific languages and works well with the libclc library to supply OpenCL built-ins. With it, you can use Clang to compile @@ -1054,7 +1058,7 @@ blob using the nVidia OpenCL library. It has been tested with several OpenCL programs, including some from the nVidia GPU Computing SDK, and the performance is on par with the nVidia compiler.
- +-mcpu=mblaze3
- and the 5-stage pipeline model can be selected with
+ pipeline model can be selected with -mcpu=mblaze3
+ and the 5-stage pipeline model can be selected with
-mcpu=mblaze5.PHINode::reserveOperandSpace has been removed. Instead, you
must specify how many operands to reserve space for when you create the
PHINode, by passing an extra argument
@@ -1260,9 +1264,9 @@
there isn't already one or ask on the LLVMdev
list.
-
+
Known problem areas include:
- +- void @llvm.eh.sjlj.dispatchsetup(i32 %dispatch_value) -- -
For SJLJ based exception handling, the llvm.eh.sjlj.dispatchsetup - intrinsic is used by targets to do any unwind edge setup they need. By - default, no action is taken.
- -PATypeHolder and OpaqueType are gone,
+ and all APIs deal with Type* instead of const
+ Type*. If you need to create recursive structures, then create a
+ named structure, and use setBody() when all its elements are
+ built. Type merging and refining is gone too: named structures are not
+ merged with other structures, even if their layout is identical. (of
+ course anonymous structures are still uniqued by layout).PHINode::reserveOperandSpace has been removed. Instead, you
must specify how many operands to reserve space for when you create the
@@ -1225,15 +1230,6 @@
use DIBuilder::finalize() at the end of translation unit to
complete debugging information encoding.PATypeHolder and OpaqueType are gone,
- and all APIs deal with Type* instead of const
- Type*. If you need to create recursive structures, then create a
- named structure, and use setBody() when all its elements are
- built. Type merging and refining is gone too: named structures are not
- merged with other structures, even if their layout is identical. (of
- course anonymous structures are still uniqued by layout).The upcoming developer's meeting is on November 18, 2011.
-We have had these meetings so far:
We have had these meetings so far:
From daniel at zuster.org Mon Nov 28 18:06:50 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:50 -0000 Subject: [llvm-commits] [llvm] r145328 - in /llvm/trunk/utils/llvm-build/llvmbuild: componentinfo.py main.py Message-ID: <20111129000650.B39E62A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:50 2011 New Revision: 145328 URL: http://llvm.org/viewvc/llvm-project?rev=145328&view=rev Log: llvmbuild/CMake: Update CMake output fragment to include explicit library dependency information. Modified: llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py llvm/trunk/utils/llvm-build/llvmbuild/main.py Modified: llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py?rev=145328&r1=145327&r2=145328&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/componentinfo.py Mon Nov 28 18:06:50 2011 @@ -138,6 +138,23 @@ def get_library_name(self): return self.library_name or self.name + def get_prefixed_library_name(self): + """ + get_prefixed_library_name() -> str + + Return the library name prefixed by the project name. This is generally + what the library name will be on disk. + """ + + basename = self.get_library_name() + + # FIXME: We need to get the prefix information from an explicit project + # object, or something. + if basename in ('gtest', 'gtest_main'): + return basename + + return 'LLVM%s' % basename + def get_llvmconfig_component_name(self): return self.get_library_name().lower() Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=145328&r1=145327&r2=145328&view=diff ============================================================================== --- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original) +++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Mon Nov 28 18:06:50 2011 @@ -354,6 +354,37 @@ print >>f, '};' f.close() + def get_required_libraries_for_component(self, ci, traverse_groups = False): + """ + get_required_libraries_for_component(component_info) -> iter + + Given a Library component info descriptor, return an iterator over all + of the directly required libraries for linking with this component. If + traverse_groups is True, then library and target groups will be + traversed to include their required libraries. + """ + + assert ci.type_name in ('Library', 'LibraryGroup', 'TargetGroup') + + for name in ci.required_libraries: + # Get the dependency info. + dep = self.component_info_map[name] + + # If it is a library, yield it. + if dep.type_name == 'Library': + yield dep + continue + + # Otherwise if it is a group, yield or traverse depending on what + # was requested. + if dep.type_name in ('LibraryGroup', 'TargetGroup'): + if not traverse_groups: + yield dep + continue + + for res in self.get_required_libraries_for_component(dep, True): + yield res + def get_fragment_dependencies(self): """ get_fragment_dependencies() -> iter @@ -447,6 +478,24 @@ ${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % ( cmake_quote_path(dep),) + # Write the properties we use to encode the required library dependency + # information in a form CMake can easily use directly. + print >>f, """ +# Explicit library dependency information. +# +# The following property assignments effectively create a map from component +# names to required libraries, in a way that is easily accessed from CMake.""" + for ci in self.ordered_component_infos: + # We only write the information for libraries currently. + if ci.type_name != 'Library': + continue + + print >>f, """\ +set_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_%s %s)""" % ( + ci.get_prefixed_library_name(), " ".join(sorted( + dep.get_prefixed_library_name() + for dep in self.get_required_libraries_for_component(ci)))) + f.close() def write_make_fragment(self, output_path): From daniel at zuster.org Mon Nov 28 18:06:53 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:53 -0000 Subject: [llvm-commits] [llvm] r145329 - /llvm/trunk/tools/edis/Makefile Message-ID: <20111129000653.93E4B2A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:53 2011 New Revision: 145329 URL: http://llvm.org/viewvc/llvm-project?rev=145329&view=rev Log: build/Make: edis isn't built as a shared library anymore, remove related cruft from the Makefile. Modified: llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=145329&r1=145328&r2=145329&view=diff ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile Mon Nov 28 18:06:53 2011 @@ -9,9 +9,6 @@ LEVEL := ../.. LIBRARYNAME := EnhancedDisassembly -LINK_LIBS_IN_SHARED := 1 - -EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports # Include this here so we can get the configuration of the targets # that have been configured for construction. We have to do this @@ -31,23 +28,3 @@ endif include $(LEVEL)/Makefile.common - -ifeq ($(HOST_OS),Darwin) - # extra options to override libtool defaults - LLVMLibsOptions := $(LLVMLibsOptions) \ - -Wl,-dead_strip - - ifdef EDIS_VERSION - LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version -Wl,$(EDIS_VERSION) \ - -Wl,-compatibility_version -Wl,1 - endif - - # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line - DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/') - ifneq ($(DARWIN_VERS),8) - LLVMLibsOptions := $(LLVMLibsOptions) \ - -Wl,-install_name \ - -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)" - endif -endif - From daniel at zuster.org Mon Nov 28 18:06:56 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:56 -0000 Subject: [llvm-commits] [llvm] r145330 - /llvm/trunk/include/llvm-c/Target.h Message-ID: <20111129000656.148B82A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:55 2011 New Revision: 145330 URL: http://llvm.org/viewvc/llvm-project?rev=145330&view=rev Log: llvm-c: Add a few missing InitializeAll* functions. Modified: llvm/trunk/include/llvm-c/Target.h Modified: llvm/trunk/include/llvm-c/Target.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Target.h?rev=145330&r1=145329&r2=145330&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Target.h (original) +++ llvm/trunk/include/llvm-c/Target.h Mon Nov 28 18:06:55 2011 @@ -47,6 +47,21 @@ #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ +/* Declare all of the available assembly printer initialization functions. */ +#define LLVM_ASM_PRINTER(TargetName) \ + void LLVMInitialize##TargetName##AsmPrinter(); +#include "llvm/Config/AsmPrinters.def" + +/* Declare all of the available assembly parser initialization functions. */ +#define LLVM_ASM_PARSER(TargetName) \ + void LLVMInitialize##TargetName##AsmParser(); +#include "llvm/Config/AsmParsers.def" + +/* Declare all of the available disassembler initialization functions. */ +#define LLVM_DISASSEMBLER(TargetName) \ + void LLVMInitialize##TargetName##Disassembler(); +#include "llvm/Config/Disassemblers.def" + /** LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support. */ @@ -64,6 +79,43 @@ #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ } + +/** LLVMInitializeAllTargetMCs - The main program should call this function if + it wants access to all available target MC that LLVM is configured to + support. */ +static inline void LLVMInitializeAllTargetMCs(void) { +#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC(); +#include "llvm/Config/Targets.def" +#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ +} + +/** LLVMInitializeAllAsmPrinters - The main program should call this function if + it wants all asm printers that LLVM is configured to support, to make them + available via the TargetRegistry. */ +static inline void LLVMInitializeAllAsmPrinters() { +#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter(); +#include "llvm/Config/AsmPrinters.def" +#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ +} + +/** LLVMInitializeAllAsmParsers - The main program should call this function if + it wants all asm parsers that LLVM is configured to support, to make them + available via the TargetRegistry. */ +static inline void LLVMInitializeAllAsmParsers() { +#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser(); +#include "llvm/Config/AsmParsers.def" +#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ +} + +/** LLVMInitializeAllDisassemblers - The main program should call this function + if it wants all disassemblers that LLVM is configured to support, to make + them available via the TargetRegistry. */ +static inline void LLVMInitializeAllDisassemblers() { +#define LLVM_DISASSEMBLER(TargetName) \ + LLVMInitialize##TargetName##Disassembler(); +#include "llvm/Config/Disassemblers.def" +#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ +} /** LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. This is useful From daniel at zuster.org Mon Nov 28 18:06:58 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:06:58 -0000 Subject: [llvm-commits] [llvm] r145331 - /llvm/trunk/tools/edis/EDMain.cpp Message-ID: <20111129000658.B32322A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:06:58 2011 New Revision: 145331 URL: http://llvm.org/viewvc/llvm-project?rev=145331&view=rev Log: edis: Don't do the target initialization in EDGetDisassembler, this is contrary to the way we currently expect target selection to work -- clients are supposed to have control over what targets are available. Modified: llvm/trunk/tools/edis/EDMain.cpp Modified: llvm/trunk/tools/edis/EDMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?rev=145331&r1=145330&r2=145331&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/tools/edis/EDMain.cpp Mon Nov 28 18:06:58 2011 @@ -17,23 +17,12 @@ #include "../../lib/MC/MCDisassembler/EDInst.h" #include "../../lib/MC/MCDisassembler/EDOperand.h" #include "../../lib/MC/MCDisassembler/EDToken.h" -#include "llvm/Support/TargetSelect.h" #include "llvm-c/EnhancedDisassembly.h" using namespace llvm; int EDGetDisassembler(EDDisassemblerRef *disassembler, const char *triple, EDAssemblySyntax_t syntax) { - static bool initialized; - if (!initialized) { - // Initialize targets and assembly printers/parsers. - llvm::InitializeAllTargetInfos(); - llvm::InitializeAllTargetMCs(); - llvm::InitializeAllAsmParsers(); - llvm::InitializeAllDisassemblers(); - initialized = true; - } - EDDisassembler::AssemblySyntax Syntax; switch (syntax) { default: assert(0 && "Unknown assembly syntax!"); From daniel at zuster.org Mon Nov 28 18:25:57 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:25:57 -0000 Subject: [llvm-commits] [llvm] r145338 - in /llvm/trunk: lib/MC/MCDisassembler/EDMain.cpp tools/CMakeLists.txt tools/Makefile tools/edis/CMakeLists.txt tools/edis/EDMain.cpp tools/edis/Makefile Message-ID: <20111129002557.A89572A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:25:57 2011 New Revision: 145338 URL: http://llvm.org/viewvc/llvm-project?rev=145338&view=rev Log: edis: Sink EDMain.cpp into lib/MC/MCDisassembler. - This fixes some layering violations and matches how we handle the llvm-c lib, for example. Added: llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp - copied, changed from r145331, llvm/trunk/tools/edis/EDMain.cpp Removed: llvm/trunk/tools/edis/CMakeLists.txt llvm/trunk/tools/edis/EDMain.cpp llvm/trunk/tools/edis/Makefile Modified: llvm/trunk/tools/CMakeLists.txt llvm/trunk/tools/Makefile Copied: llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp (from r145331, llvm/trunk/tools/edis/EDMain.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp?p2=llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp&p1=llvm/trunk/tools/edis/EDMain.cpp&r1=145331&r2=145338&rev=145338&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/lib/MC/MCDisassembler/EDMain.cpp Mon Nov 28 18:25:57 2011 @@ -11,12 +11,10 @@ // //===----------------------------------------------------------------------===// -// FIXME: This code isn't layered right, the headers should be moved to -// include llvm/MC/MCDisassembler or something. -#include "../../lib/MC/MCDisassembler/EDDisassembler.h" -#include "../../lib/MC/MCDisassembler/EDInst.h" -#include "../../lib/MC/MCDisassembler/EDOperand.h" -#include "../../lib/MC/MCDisassembler/EDToken.h" +#include "EDDisassembler.h" +#include "EDInst.h" +#include "EDOperand.h" +#include "EDToken.h" #include "llvm-c/EnhancedDisassembly.h" using namespace llvm; Modified: llvm/trunk/tools/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=145338&r1=145337&r2=145338&view=diff ============================================================================== --- llvm/trunk/tools/CMakeLists.txt (original) +++ llvm/trunk/tools/CMakeLists.txt Mon Nov 28 18:25:57 2011 @@ -50,7 +50,6 @@ add_subdirectory(bugpoint-passes) add_subdirectory(llvm-bcanalyzer) add_subdirectory(llvm-stub) -add_subdirectory(edis) if( NOT WIN32 ) add_subdirectory(lto) Modified: llvm/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=145338&r1=145337&r2=145338&view=diff ============================================================================== --- llvm/trunk/tools/Makefile (original) +++ llvm/trunk/tools/Makefile Mon Nov 28 18:25:57 2011 @@ -56,14 +56,6 @@ endif PARALLEL_DIRS += bugpoint-passes - - # The edis library is only supported if ARM and/or X86 are enabled, and if - # LLVM is being built PIC on platforms that support dylibs. - ifneq ($(DISABLE_EDIS),1) - ifneq ($(filter $(TARGETS_TO_BUILD), X86 ARM),) - PARALLEL_DIRS += edis - endif - endif endif ifdef LLVM_HAS_POLLY Removed: llvm/trunk/tools/edis/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/CMakeLists.txt?rev=145337&view=auto ============================================================================== --- llvm/trunk/tools/edis/CMakeLists.txt (original) +++ llvm/trunk/tools/edis/CMakeLists.txt (removed) @@ -1,21 +0,0 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -set(SOURCES - ../../include/llvm-c/EnhancedDisassembly.h - EDMain.cpp - ) - -set(EDIS_DEPENDS LLVMMCDisassembler LLVMMCParser) -if( LLVM_TARGETS_TO_BUILD MATCHES X86 ) - list(APPEND EDIS_DEPENDS LLVMX86AsmPrinter LLVMX86AsmParser LLVMX86Disassembler LLVMX86Desc) -endif() -if( LLVM_TARGETS_TO_BUILD MATCHES ARM ) - list(APPEND EDIS_DEPENDS LLVMARMAsmPrinter LLVMARMAsmParser LLVMARMDisassembler LLVMARMDesc) -endif() - -add_llvm_library(EnhancedDisassembly ${SOURCES}) -set_property(TARGET EnhancedDisassembly PROPERTY - OUTPUT_NAME "EnhancedDisassembly") - -add_llvm_library_dependencies(EnhancedDisassembly - ${EDIS_DEPENDS}) Removed: llvm/trunk/tools/edis/EDMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?rev=145337&view=auto ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/tools/edis/EDMain.cpp (removed) @@ -1,282 +0,0 @@ -//===-- EDMain.cpp - LLVM Enhanced Disassembly C API ----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the enhanced disassembler's public C API. -// -//===----------------------------------------------------------------------===// - -// FIXME: This code isn't layered right, the headers should be moved to -// include llvm/MC/MCDisassembler or something. -#include "../../lib/MC/MCDisassembler/EDDisassembler.h" -#include "../../lib/MC/MCDisassembler/EDInst.h" -#include "../../lib/MC/MCDisassembler/EDOperand.h" -#include "../../lib/MC/MCDisassembler/EDToken.h" -#include "llvm-c/EnhancedDisassembly.h" -using namespace llvm; - -int EDGetDisassembler(EDDisassemblerRef *disassembler, - const char *triple, - EDAssemblySyntax_t syntax) { - EDDisassembler::AssemblySyntax Syntax; - switch (syntax) { - default: assert(0 && "Unknown assembly syntax!"); - case kEDAssemblySyntaxX86Intel: - Syntax = EDDisassembler::kEDAssemblySyntaxX86Intel; - break; - case kEDAssemblySyntaxX86ATT: - Syntax = EDDisassembler::kEDAssemblySyntaxX86ATT; - break; - case kEDAssemblySyntaxARMUAL: - Syntax = EDDisassembler::kEDAssemblySyntaxARMUAL; - break; - } - - EDDisassemblerRef ret = EDDisassembler::getDisassembler(triple, Syntax); - - if (!ret) - return -1; - *disassembler = ret; - return 0; -} - -int EDGetRegisterName(const char** regName, - EDDisassemblerRef disassembler, - unsigned regID) { - const char *name = ((EDDisassembler*)disassembler)->nameWithRegisterID(regID); - if (!name) - return -1; - *regName = name; - return 0; -} - -int EDRegisterIsStackPointer(EDDisassemblerRef disassembler, - unsigned regID) { - return ((EDDisassembler*)disassembler)->registerIsStackPointer(regID) ? 1 : 0; -} - -int EDRegisterIsProgramCounter(EDDisassemblerRef disassembler, - unsigned regID) { - return ((EDDisassembler*)disassembler)->registerIsProgramCounter(regID) ? 1:0; -} - -unsigned int EDCreateInsts(EDInstRef *insts, - unsigned int count, - EDDisassemblerRef disassembler, - ::EDByteReaderCallback byteReader, - uint64_t address, - void *arg) { - unsigned int index; - - for (index = 0; index < count; ++index) { - EDInst *inst = ((EDDisassembler*)disassembler)->createInst(byteReader, - address, arg); - - if (!inst) - return index; - - insts[index] = inst; - address += inst->byteSize(); - } - - return count; -} - -void EDReleaseInst(EDInstRef inst) { - delete ((EDInst*)inst); -} - -int EDInstByteSize(EDInstRef inst) { - return ((EDInst*)inst)->byteSize(); -} - -int EDGetInstString(const char **buf, - EDInstRef inst) { - return ((EDInst*)inst)->getString(*buf); -} - -int EDInstID(unsigned *instID, EDInstRef inst) { - *instID = ((EDInst*)inst)->instID(); - return 0; -} - -int EDInstIsBranch(EDInstRef inst) { - return ((EDInst*)inst)->isBranch(); -} - -int EDInstIsMove(EDInstRef inst) { - return ((EDInst*)inst)->isMove(); -} - -int EDBranchTargetID(EDInstRef inst) { - return ((EDInst*)inst)->branchTargetID(); -} - -int EDMoveSourceID(EDInstRef inst) { - return ((EDInst*)inst)->moveSourceID(); -} - -int EDMoveTargetID(EDInstRef inst) { - return ((EDInst*)inst)->moveTargetID(); -} - -int EDNumTokens(EDInstRef inst) { - return ((EDInst*)inst)->numTokens(); -} - -int EDGetToken(EDTokenRef *token, - EDInstRef inst, - int index) { - return ((EDInst*)inst)->getToken(*(EDToken**)token, index); -} - -int EDGetTokenString(const char **buf, - EDTokenRef token) { - return ((EDToken*)token)->getString(*buf); -} - -int EDOperandIndexForToken(EDTokenRef token) { - return ((EDToken*)token)->operandID(); -} - -int EDTokenIsWhitespace(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenWhitespace; -} - -int EDTokenIsPunctuation(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenPunctuation; -} - -int EDTokenIsOpcode(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenOpcode; -} - -int EDTokenIsLiteral(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenLiteral; -} - -int EDTokenIsRegister(EDTokenRef token) { - return ((EDToken*)token)->type() == EDToken::kTokenRegister; -} - -int EDTokenIsNegativeLiteral(EDTokenRef token) { - if (((EDToken*)token)->type() != EDToken::kTokenLiteral) - return -1; - - return ((EDToken*)token)->literalSign(); -} - -int EDLiteralTokenAbsoluteValue(uint64_t *value, EDTokenRef token) { - if (((EDToken*)token)->type() != EDToken::kTokenLiteral) - return -1; - - return ((EDToken*)token)->literalAbsoluteValue(*value); -} - -int EDRegisterTokenValue(unsigned *registerID, - EDTokenRef token) { - if (((EDToken*)token)->type() != EDToken::kTokenRegister) - return -1; - - return ((EDToken*)token)->registerID(*registerID); -} - -int EDNumOperands(EDInstRef inst) { - return ((EDInst*)inst)->numOperands(); -} - -int EDGetOperand(EDOperandRef *operand, - EDInstRef inst, - int index) { - return ((EDInst*)inst)->getOperand(*(EDOperand**)operand, index); -} - -int EDOperandIsRegister(EDOperandRef operand) { - return ((EDOperand*)operand)->isRegister(); -} - -int EDOperandIsImmediate(EDOperandRef operand) { - return ((EDOperand*)operand)->isImmediate(); -} - -int EDOperandIsMemory(EDOperandRef operand) { - return ((EDOperand*)operand)->isMemory(); -} - -int EDRegisterOperandValue(unsigned *value, EDOperandRef operand) { - if (!((EDOperand*)operand)->isRegister()) - return -1; - *value = ((EDOperand*)operand)->regVal(); - return 0; -} - -int EDImmediateOperandValue(uint64_t *value, EDOperandRef operand) { - if (!((EDOperand*)operand)->isImmediate()) - return -1; - *value = ((EDOperand*)operand)->immediateVal(); - return 0; -} - -int EDEvaluateOperand(uint64_t *result, EDOperandRef operand, - ::EDRegisterReaderCallback regReader, void *arg) { - return ((EDOperand*)operand)->evaluate(*result, regReader, arg); -} - -#ifdef __BLOCKS__ - -struct ByteReaderWrapper { - EDByteBlock_t byteBlock; -}; - -static int readerWrapperCallback(uint8_t *byte, - uint64_t address, - void *arg) { - struct ByteReaderWrapper *wrapper = (struct ByteReaderWrapper *)arg; - return wrapper->byteBlock(byte, address); -} - -unsigned int EDBlockCreateInsts(EDInstRef *insts, - int count, - EDDisassemblerRef disassembler, - EDByteBlock_t byteBlock, - uint64_t address) { - struct ByteReaderWrapper wrapper; - wrapper.byteBlock = byteBlock; - - return EDCreateInsts(insts, - count, - disassembler, - readerWrapperCallback, - address, - (void*)&wrapper); -} - -int EDBlockEvaluateOperand(uint64_t *result, EDOperandRef operand, - EDRegisterBlock_t regBlock) { - return ((EDOperand*)operand)->evaluate(*result, regBlock); -} - -int EDBlockVisitTokens(EDInstRef inst, ::EDTokenVisitor_t visitor) { - return ((EDInst*)inst)->visitTokens((llvm::EDTokenVisitor_t)visitor); -} - -#else - -extern "C" unsigned int EDBlockCreateInsts() { - return 0; -} - -extern "C" int EDBlockEvaluateOperand() { - return -1; -} - -extern "C" int EDBlockVisitTokens() { - return -1; -} - -#endif Removed: llvm/trunk/tools/edis/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/Makefile?rev=145337&view=auto ============================================================================== --- llvm/trunk/tools/edis/Makefile (original) +++ llvm/trunk/tools/edis/Makefile (removed) @@ -1,30 +0,0 @@ -##===- tools/edis/Makefile -----------------------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## - -LEVEL := ../.. -LIBRARYNAME := EnhancedDisassembly - -# Include this here so we can get the configuration of the targets -# that have been configured for construction. We have to do this -# early so we can set up LINK_COMPONENTS before including Makefile.rules -include $(LEVEL)/Makefile.config - -LINK_COMPONENTS := mcdisassembler - -# If the X86 target is enabled, link in the asmprinter and disassembler. -ifneq ($(filter $(TARGETS_TO_BUILD), X86),) -LINK_COMPONENTS += x86asmprinter x86disassembler -endif - -# If the ARM target is enabled, link in the asmprinter and disassembler. -ifneq ($(filter $(TARGETS_TO_BUILD), ARM),) -LINK_COMPONENTS += armasmprinter armdisassembler -endif - -include $(LEVEL)/Makefile.common From chandlerc at gmail.com Mon Nov 28 18:32:43 2011 From: chandlerc at gmail.com (Chandler Carruth) Date: Tue, 29 Nov 2011 00:32:43 -0000 Subject: [llvm-commits] [llvm] r145340 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <20111129003243.879452A6C12C@llvm.org> Author: chandlerc Date: Mon Nov 28 18:32:43 2011 New Revision: 145340 URL: http://llvm.org/viewvc/llvm-project?rev=145340&view=rev Log: Add a link from the LLVM release notes to the Clang release notes. I suspect we could profitably remove/move some of the bullet points under Clang here to the Clang notes in order to keep things clean on both sides. Unless I hear objections I'll start doing that once folks have read over the Clang notes a bit. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=145340&r1=145339&r2=145340&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Nov 28 18:32:43 2011 @@ -94,8 +94,7 @@ production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86 (32- and 64-bit), and for Darwin/ARM targets. -In the LLVM 3.0 time-frame, the Clang team has made many improvements:
- +In the LLVM 3.0 time-frame, the Clang team has made many improvements:
If Clang rejects your code but another compiler accepts it, please take a From daniel at zuster.org Mon Nov 28 18:33:14 2011 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 29 Nov 2011 00:33:14 -0000 Subject: [llvm-commits] [llvm] r145341 - /llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Message-ID: <20111129003314.B601F2A6C12C@llvm.org> Author: ddunbar Date: Mon Nov 28 18:33:14 2011 New Revision: 145341 URL: http://llvm.org/viewvc/llvm-project?rev=145341&view=rev Log: build: Update CMakeLists.txt. Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt?rev=145341&r1=145340&r2=145341&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt (original) +++ llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Mon Nov 28 18:33:14 2011 @@ -2,6 +2,7 @@ Disassembler.cpp EDDisassembler.cpp EDInst.cpp + EDMain.cpp EDOperand.cpp EDToken.cpp ) From atrick at apple.com Mon Nov 28 18:52:05 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 00:52:05 -0000 Subject: [llvm-commits] [llvm] r145343 - /llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll Message-ID: <20111129005205.15E0D2A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 18:52:04 2011 New Revision: 145343 URL: http://llvm.org/viewvc/llvm-project?rev=145343&view=rev Log: Reenable this IndVars unit test. SCEV can't optimize undef in all cases, which is a separate issue from this test case. Modified: llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll Modified: llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll?rev=145343&r1=145342&r2=145343&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll (original) +++ llvm/trunk/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll Mon Nov 28 18:52:04 2011 @@ -3,9 +3,6 @@ ; add219 should be extended to i64 because it is nsw, even though its ; sext cannot be hoisted outside the loop. -; FIXME: GetExtendedOperandRecurrence has problems with the nsw bit on add exprs -; XFAIL: * - target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" define void @test() nounwind { @@ -22,7 +19,7 @@ ; CHECK: add nsw i64 %indvars.iv, 1 for.body170: ; preds = %for.body170, %for.body153 - %i2.19 = phi i32 [ %add249, %for.body170 ], [ undef, %for.body153 ] + %i2.19 = phi i32 [ %add249, %for.body170 ], [ 0, %for.body153 ] %add219 = add nsw i32 %i2.19, 1 %idxprom220 = sext i32 %add219 to i64 %add249 = add nsw i32 %i2.19, %shl132 From sabre at nondot.org Mon Nov 28 19:04:41 2011 From: sabre at nondot.org (Chris Lattner) Date: Tue, 29 Nov 2011 01:04:41 -0000 Subject: [llvm-commits] [www] r145344 - /www/trunk/header.incl Message-ID: <20111129010441.7C9762A6C12C@llvm.org> Author: lattner Date: Mon Nov 28 19:04:41 2011 New Revision: 145344 URL: http://llvm.org/viewvc/llvm-project?rev=145344&view=rev Log: add the new devmtg to the sidebar Modified: www/trunk/header.incl Modified: www/trunk/header.incl URL: http://llvm.org/viewvc/llvm-project/www/trunk/header.incl?rev=145344&r1=145343&r2=145344&view=diff ============================================================================== --- www/trunk/header.incl (original) +++ www/trunk/header.incl Mon Nov 28 19:04:41 2011 @@ -120,6 +120,7 @@ Developer Mtgs
From atrick at apple.com Mon Nov 28 20:05:23 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 02:05:23 -0000 Subject: [llvm-commits] [llvm] r145363 - /llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll Message-ID: <20111129020523.BDA182A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 20:05:23 2011 New Revision: 145363 URL: http://llvm.org/viewvc/llvm-project?rev=145363&view=rev Log: Filecheckize. Modified: llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll Modified: llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll?rev=145363&r1=145362&r2=145363&view=diff ============================================================================== --- llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll (original) +++ llvm/trunk/test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll Mon Nov 28 20:05:23 2011 @@ -1,6 +1,7 @@ -; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %loop: backedge-taken count is (100 + (-100 smax %n))} +; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s ; PR2002 +; CHECK: Loop %loop: backedge-taken count is (100 + (-100 smax %n)) define void @foo(i8 %n) { entry: br label %loop From atrick at apple.com Mon Nov 28 20:06:35 2011 From: atrick at apple.com (Andrew Trick) Date: Tue, 29 Nov 2011 02:06:35 -0000 Subject: [llvm-commits] [llvm] r145364 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <20111129020635.E230A2A6C12C@llvm.org> Author: atrick Date: Mon Nov 28 20:06:35 2011 New Revision: 145364 URL: http://llvm.org/viewvc/llvm-project?rev=145364&view=rev Log: Make SCEV printIn cases where the pointer argument is a vector of pointers, only a + ? single index may be used. For example:
++ %A = getelementptr <4 x i8*> %ptrs, <4 x i64> %offsets, +Also mention that the number of elements must be the same. - ?%X = ptrtoint i32* %X to i8 ? ? ? ? ? ; yields truncation on 32-bit architecture - ?%Y = ptrtoint i32* %x to i64 ? ? ? ? ?; yields zero extension on 32-bit architecture + ?%X = ptrtoint i32* %X to i8 ? ? ? ? ? ? ? ? ? ? ? ? ; yields truncation on 32-bit architecture While you're here, please make this use "%x" (lowercase) as the operand consistently. The existing code "%X = op %X" is bad form (using its own result). Also update the overview and summary for the instruction, replace "pointer" with "pointer or vector of pointers" and "integer" with "integer or vector of integers". See the documentation of "add" for example. The semantics can simply mention that for a vector it does the operation elementwise. Same with inttoptr and bitcast. ?template