From 13237ac3b9d5fe194c1999525f5ca036ca29c589 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 6 Jun 2008 12:08:01 +0000 Subject: Wrap MVT::ValueType in a struct to get type safety and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044 --- llvm/utils/TableGen/CodeGenIntrinsics.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/utils/TableGen/CodeGenIntrinsics.h') diff --git a/llvm/utils/TableGen/CodeGenIntrinsics.h b/llvm/utils/TableGen/CodeGenIntrinsics.h index 4515ebcdc6a..a66c30b6cb8 100644 --- a/llvm/utils/TableGen/CodeGenIntrinsics.h +++ b/llvm/utils/TableGen/CodeGenIntrinsics.h @@ -29,13 +29,13 @@ namespace llvm { std::string EnumName; // The name of the enum "bswap_i32" std::string GCCBuiltinName;// Name of the corresponding GCC builtin, or "". std::string TargetPrefix; // Target prefix, e.g. "ppc" for t-s intrinsics. - - /// ArgVTs - The MVT::ValueType for each argument type. Note that this list - /// is only populated when in the context of a target .td file. When - /// building Intrinsics.td, this isn't available, because we don't know the - /// target pointer size. - std::vector ArgVTs; - + + /// ArgVTs - The MVT::SimpleValueType for each argument type. Note that + /// this list is only populated when in the context of a target .td file. + /// When building Intrinsics.td, this isn't available, because we don't know + /// the target pointer size. + std::vector ArgVTs; + /// ArgTypeDefs - The records for each argument type. /// std::vector ArgTypeDefs; -- cgit v1.2.3